The Justice Department and a Northeastern Democrat have formed a rare alliance intended to restrict gun sales to terror suspects.

The bill, introduced late Thursday by Sen. Frank Lautenberg, D-N.J., after two years of study produced an endorsement by the Justice Department, would give the attorney general power to block gun sales to persons on terrorism watch lists. In some instances, the attorney general could let a sale go through — for example, when stopping the sale would hinder a terrorism investigation.

The measure also includes ways for would-be buyers to appeal a denial by the attorney general.

"The administration finally realized that letting terrorists buy guns is dangerous," Lautenberg said. "This 'terror' gap in our gun laws has been open too long."

The Justice Department, which endorsed the idea in letters this week to congressional leaders, said the delay was necessary in part to study potential situations in which barring a gun buy could interfere with investigations and intelligence collection.

"There are circumstances in which it may be counterproductive to mandate the denial of a firearm transfer to an individual on a terrorist watch list," said Justice Department spokesman Dean Boyd.

For example, letting a prospective gun buyer know that he's barred from the purchase because he is on a watch list could prompt the suspect to go into hiding.

Such suspects can now buy firearms if background checks clear them of prohibitions including felony convictions, mental illness and illegal immigration status.

Being on a terrorist watch list isn't one of the flags that would bar a gun sale — a loophole that law enforcement officials have cautioned could be exploited by would-be terrorists.