Hounded by mortal enemies and its own blunders, the Bureau of Alcohol, Tobacco and Firearms is facing its gravest crisis ever.

Its top officials know that ongoing congressional investigations into its role in the disastrous Waco raid and into the whites-only gatherings of law enforcement officers in Tennessee are a sure prelude to a new congressional effort to eliminate the agency.

But ATF has faced death before and has squared off with the same adversaries it faces today: the National Rifle Association and its supporters, who believe the agency is in the vanguard of liberals in the federal government bent on a grand scheme to confiscate America's firearms.

The NRA has been trying to kill ATF for decades, and while the politically powerful gun group has reduced ATF's budgets -- as well as weakened its ability to regulate firearms and investigate gun crimes -- the association has never been able to get rid of the embattled agency. But the new congressional Republican leadership is beholden to the NRA for its key role in helping the GOP sweep Congress last autumn.

As a result, today's testimony before the House Waco committee by ATF Director John W. Magaw and Ronald K. Noble, the Treasury Department's undersecretary for enforcement, could be crucial in setting the agency's fate.

Some Republicans want to use the hearings into the Waco siege and the "Good Ol' Boys Roundups" in Tennessee to justify loosening firearms laws, cutting ATF's $325-million-a-year budget, restricting its duties and distributing its responsibilities to other law enforcement agencies, congressional officials said.

ATF executives say they will fight for their agency's survival again, but street agents, many of them Vietnam combat veterans, say they feel just the way they did returning from war years ago -- abandoned by their own government.

"We ask the men and women of ATF to do some of the most dangerous jobs in America, and they get the equivalent of spit on, sometimes by elected officials," said John Killorin, a 24-year ATF veteran and an agency spokesman. "ATF agents know Congress doesn't love them, and fat-cat lobbyists . . . are doing things that make their jobs harder."

The ATF has always felt under siege. A headquarters building in downtown Washington is named for Ariel Rios, an ATF agent killed in a 1983 shootout in a Miami motel room when a drug sting went bad. Agency officials say the name makes a grimly ironic reference known inside ATF -- Rios had a layoff notice in his pocket when he was shot, the result of a brutal round of budget cutbacks prompted by NRA attacks on the agency during the Reagan years.

"This is a strange situation," said Magaw, who became ATF director in 1993 after 26 years climbing the ranks at the Secret Service. "Lobbyists have been able to keep the ATF gutted, and keep it short on budgets. . . . Our people become accustomed to the fact they're always under attack from the NRA."

So-called militia groups also pushed Congress to hold Waco hearings, but some of their members go beyond lobbying. Police officials say some militias stalk ATF agents; they cite Michigan Militia members who have been found with the names and addresses of ATF agents, as well as the addresses of their children's schools.

But the ATF will call on its own allies in the coming congressional battles, including the Fraternal Order of Police, the liquor industry and fire chiefs and insurance industry executives, who support the agency's work in investigating arson.

The NRA is not alone in denouncing the agency for its errors in the February 1993 raid on the Branch Davidian compound in Texas that left four ATF agents and six Davidians dead and touched off the 51-day siege. And black ATF agents have filed a lawsuit alleging racism inside the agency and asserting the Good Ol' Boys Roundups -- which were organized by an ATF supervisor and were the site of racist activities -- demonstrate the agency's insensitivity to minorities.

Last week's House hearings on Waco yielded countless accusations against the agency, but ATF's 3,500 agents and inspectors are accustomed to congressional second-guessing because so much of what they do is tinged with controversy.

ATF regulates three products that are popular with Americans but prone to abuse -- alcohol, cigarettes and firearms. Besides collecting $14 billion annually in taxes from their manufacturers, the agency prosecutes people who traffic in them illegally.

ATF investigates abortion clinic bombings, arson-for-hire rings, gun-running by motorcycle gangs and neo-Nazis and drug dealing in public housing projects. Its agents tracked the AK-47 allegedly used to murder two CIA employees outside agency headquarters in 1993. And on Feb. 28, 1993, the day ATF agents bumbled into their fatal shootout with the Branch Davidians, another agent helped New York City police find the small metal fragment of a van that broke the investigation into the World Trade Center bombing.

But the agency has drawn public scorn from the start. In 1791, Congress established a precursor agency to collect taxes on liquor -- causing the Whiskey Rebellion by western Pennsylvania farmers.

Some 186 agents of ATF or predecessor organizations have been killed on duty, more than any law enforcement agency. Most of them were "revenuers," agents who spent months at a time dispatched deep in the hills and hollows of the South searching for illegal moonshine stills. The old southern populist hatred of the liquor revenuers rivals the outrage today on the part of the NRA leadership and the militia movement, agents say.

In the wake of the Kennedy and King assassinations and rising crime in America's cities, Congress in 1968 tightened laws on making and transporting firearms and required gun dealers to obtain licenses and keep records. President Richard M. Nixon established ATF in 1972, splitting it off from the Internal Revenue Service.

Soon the NRA was accusing ATF of outrageous assaults on gun owners' rights -- climaxing in the first congressional hearings into supposed ATF abuses in 1979.

Responding to NRA pressure that the agency was planning a sinister national gun registry, Congress cut ATF's budget and forbade it to computerize its records.

The ban still stands and forces ATF clerks to search warehouses of paper records to keep track of guns used in crimes. Moreover, Congress made becoming a gun dealer entirely hassle-free, limiting the ATF to 200 inspectors to review the records of some 200,000 dealers, guaranteeing each would be visited about every 20 years. Recently, ATF slightly stepped up scrutiny of dealers, prompting NRA to protest that the actions amount to unconstitutional harassment and are a prelude to a gun ban.

Ronald Reagan, campaigning for president in 1980 with strong NRA support, promised to abolish ATF, and after his election attempted to carry out his pledge. The agency's 1,600 gun and arson investigators were to be transferred to the Secret Service, and the FBI was to take over other functions.

But those agencies had top-notch computer systems, and NRA officials soon concluded they preferred a weakened ATF inside Treasury. "The NRA realized it wanted a cowed but chastened ATF," said one NRA official.

Years of worsening budget cuts -- and a 1986 law pushed by the NRA that placed many roadblocks in the way of ATF's attempts to regulate gun dealers -- prompted agents to nickname the Reagan era "the Holocaust."

The agency's fortunes improved in the late 1980s, when Congress vastly increased the penalties for armed drug dealers -- and ATF stepped up its work patrolling drug-ravaged neighborhoods in cities such as the District of Columbia.

The NRA became newly agitated when Congress and a number of states passed new gun-control laws, including the Brady law, which requires a five-day waiting period for a handgun purchase. Congress's passage of the assault weapons ban last year was a key defeat for the group, and soon it again was calling ATF "jack-booted government thugs."

Then Republicans took over in Congress, and, in the wake of the bombing of a federal building in Oklahoma City, the GOP delayed consideration of the NRA's top agenda item -- repeal of the assault weapons ban. But as a consolation prize, congressional officials said, Republican leaders told the NRA they would schedule Waco hearings this summer.

"NRA people at headquarters are dancing in the hallways with glee at the fact the Waco hearings are on," one NRA official said. "This is their dream."

Meanwhile, the Clinton administration and congressional Democrats continue to hammer the Republican-led House Waco committee, saying it is doing the NRA's bidding. Besides trying to protect Clinton politically, they're also trying to prepare for GOP attempts to gut the agency.

"It's rocky times for our troops," Magaw said. "It's so uncertain, so unsteady." CAPTION: Federal Bureau of Alcohol, Tobacco and Firearms agents console each other after the failed attack on the Branch Davidian compound near Waco, Tex. Gun advocates are using the Waco debacle in a renewed assault on ATF. CAPTION: JOHN W. MAGAW.