Only a few months ago, this looked like the year that the National Rifle Association -- long touted as one of Washington's most powerful lobbies -- was finally going to take its lumps in the halls of Congress. The Senate had three times approved a limited ban on semiautomatic assault weapons and the House Judiciary Committee had overwhelmingly backed a seven-day waiting period for handgun purchases.

But this week, as the dust settled from the 101st Congress, it was the NRA that was celebrating. After sending out 10 million "membership alert" mailings urging gun owners to register their disapproval and receiving what gun control advocates describe as an invaluable boost from House Speaker Thomas S. Foley (D-Wash.), the gun lobby emerged triumphant on every legislative front.

In the final hours of the session, a House-Senate conference committee meeting on an omnibus crime bill even handed the NRA an unexpected victory. As part of an effort to clear the measure of "controversial" provisions, the conferees dropped the Senate-passed assault weapons ban. But they left intact a House-passed amendment, strongly backed by the NRA, that explicitly protects U.S. gun makers who want to continue to produce semiautomatic assault weapons -- as long as they are made from domestically produced parts.

When gun control advocates prevailed in the Senate in June, "I was telling people it wasn't over till it's over," James Jay Baker, the NRA's director of federal affairs, said yesterday. "It turned out the way, obviously, we would have liked it to have turned out. . . . I think we did a good job for gun owners nationally this year."

Gun control advocates and law enforcement organizations were infuriated by the last-minute maneuverings, and charged that Congress had ducked an opportunity to take steps to help curb violent gun-related crime.

"I would say the entire police community is genuinely upset," said Jules Bernstein, legislative counsel for the National Association of Police Organizations, one of a number of police groups that had lobbied for restrictions on assault weapons. "They talk about crime and say they want a crime bill, but they really don't want to do anything that offends the gun owners in this country."

In recent days, gun control advocates have blamed their setbacks this year mostly on Foley, a consistent NRA supporter who, they charged, repeatedly prevented the House Rules Committee from permitting floor votes on the assault weapons and handgun waiting period issues.

"We obviously have one big problem in the House -- and it's Speaker Foley," said Gwen Fitzgerald, a spokeswoman for Handgun Control Inc. "Until we can get him to give us a fair shake, it is going to be very difficult to pass any gun legislation."

But a spokesman for Foley and other congressional staff members suggested the last-minute legislative maneuvering was more complicated.

Jeffrey Biggs, the spokesman, acknowledged yesterday that Foley had kept the handgun waiting period legislation from the floor in the final days.

But Biggs said Foley was acting in large part to prevent the House from being bogged down in a hotly divisive issue and to protect House Democrats when the Senate had not taken action on handgun waiting periods.

"It doesn't serve a hell of a big purpose to have the House vote on highly controversial bills if it's not going to lead anywhere," said Biggs. "But the speaker has said a number of times he should not be regarded as a permanent obstacle" to the measure.

Other staff members said it was Rep. William J. Hughes (D-N.J.), a gun control advocate, who ultimately rejected Foley's offer to bring an assault weapons ban to a floor vote in the final days for fear it would lose. The sentiment in the House became clear Oct. 4 when an amendment drafted by Rep. Jolene Unsoeld (D-Wash.), permitting the continued manufacture of U.S. assault weapons from domestically produced parts, passed overwhelmingly, 257 to 172.

Common Cause said last week that the members who voted in favor of the Unsoeld amendment had received $1,395,963 in campaign contributions from the NRA in the last three election cycles. In addition, Unsoeld received a $4,950 campaign check from the NRA the day after she introduced her amendment.

Unsoeld has said charges that the NRA contribution influenced her position are "baloney." Baker, who said he met with Unsoeld several times to discuss the amendment, dismissed the idea that NRA contributions make much of a difference. But he acknowledged that the NRA had sent out three "membership alert" mailings to its 3 million members as well as other targeted mailings in swing districts.

"In the final analysis," he said, "I don't think gun control is a popular topic with the Senate and the House."