In January 1989, a troubled drifter in his 20s opened fire with a semiautomatic rifle on a California elementary school yard packed with students. Five children, ages 6 to 9, were killed in the fusillade of bullets; 29 others were wounded, along with one teacher.

The resulting national shock and outrage plunged Congress into a debate over whether to ban military-style assault weapons.

“The American people are fed up with the death and violence brought on by these assault weapons,” Senator Howard M. Metzenbaum, an Ohio Democrat, declared on the Senate floor. “They demand action.”

Action, however, would take time. The gun lobby put up roadblocks. The politics, just as today, were fraught. It took five years of legislative slogging to pass a federal assault weapons ban that finally took effect in 1994. But the price of passage was a host of compromises — most painfully for supporters, a sunset provision added late in the legislative wrangling that paved the way for the measure to expire in 2004.

Now, after another massacre at an elementary school by a gunman wielding a semiautomatic rifle, the Obama administration is working to develop a new set of gun-control proposals. With calls from some in Washington and across the country for reviving the assault weapons ban, the experience of the early 1990s offers lessons that can inform the current debate.

Just as it was then, the most difficult terrain to navigate will most likely be political, as any new federal measure would have to overcome the opposition of pro-gun lawmakers and the gun lobby. But contours of the policy will be nettlesome as well. As states and the federal government have experimented with various kinds of assault weapons bans over the years, gun manufacturers have excelled at finding ways around the restrictions, tweaking their guns just enough to comply with new laws.

The federal ban also yielded mixed results in its decade of existence. A 2004 study by the University of Pennsylvania, financed by the Justice Department, found that the measure, which included a ban on ammunition magazines that could hold more than 10 rounds, had only a limited impact on gun crime.

The study explained that part of the issue was all the exceptions to the law. Assault weapons and large-capacity magazines manufactured before 1994 were exempted from the ban, meaning that more than 1.5 million assault weapons remained in circulation. In addition, the country’s stock of large-capacity magazines actually continued to grow after the ban, because it remained legal to import them as long as they had been made before the ban.

Another challenge for lawmakers was defining precisely what an assault weapon is, which allowed the industry to continue manufacturing guns similar to those that had been banned.

Connecticut, in fact, has an assault weapons ban, similar to the old federal law. But law enforcement officials have said that they believe the guns that Adam Lanza used in the Newtown shooting — including a .223 Bushmaster semiautomatic carbine, which is often described as a military-style assault weapon — were legally acquired and registered.

Connecticut’s law adheres to the old federal standard, defining an assault weapon as one able to accept a detachable magazine and that includes at least two other combat-type features. In the case of a rifle, these might include a pistol grip, a flash suppressor, or a grenade launcher. Guns that have just one of these additional accessories can comply with the law.

California, in contrast, has one of the strictest bans in the nation — forbidding semiautomatic rifles and pistols with easy-to-reload, detachable magazines, if they also have just one other military-style accessory. But gun manufacturers have been able to get around some of its strictures with an device known as the Bullet Button.

The device allows gun owners to pop out their magazines quickly by inserting the tip of a bullet or some other small tool into a button on the side of their weapons. Since the magazine requires a tool to release it — and cannot be released by hand — it is not considered “detachable” under California law.

A little more than half a dozen states currently have laws banning assault weapons, but definitions vary from state to state.

Video

Obama Speaks on Gun Control

In the aftermath of a deadly shooting at Sandy Hook Elementary in Newtown, Conn., President Obama addresses the nation on gun control and also talks about ongoing fiscal negotiations.

Brian Malte, the director of network mobilization at the Brady Campaign to Prevent Gun Violence, said that assault weapons bans should be written “to give as little room as possible for unscrupulous gun manufacturers to evade such a law.”

The National Rifle Association, which has kept a low profile since the Newtown shooting beyond expressing sympathy for the victims, called a news conference for Friday, promising to offer “meaningful contributions to make sure this never happens again.”

Beyond the policy questions facing lawmakers, however, lie the tricky political calculations — just as they did two decades ago.

An error has occurred. Please try again later.

You are already subscribed to this email.

The chief protagonists then included three senators: Mr. Metzenbaum, a longtime liberal firebrand from Ohio; Dennis DeConcini, a moderate Democrat from Arizona; and Dianne Feinstein, a California Democrat who was then new to the Senate. (Ms. Feinstein vowed this week to introduce a bill to revive the ban in the wake of the Newtown shootings.) In the House, Representative Charles E. Schumer, Democrat of New York, now a senator, was the workhorse.

The most surprising member of the group was Mr. DeConcini, who had consistently voted with the National Rifle Association and was once even named their “legislator of the month.”

The Stockton shooting, however, was a galvanizing moment, he said in a telephone interview. He approached N.R.A. officials to see if they would work with him in drafting a “responsible bill,” he said. After conversations over several months, however, he said, N.R.A. officials broke off talks, saying they feared they would lose members if they went along.

“I’ll never forget that,” Mr. DeConcini said.

Both Mr. Metzenbaum and Mr. DeConcini wound up introducing bills to ban assault weapons after the Stockton shooting. A proposal passed the Senate that year but went nowhere in the House.

In the years that followed, more mass shootings involving assault weapons made headlines. Gang violence involving high-powered weapons also escalated.

Crucial to how the ban finally moved forward in 1993, however, was the emergence of a large omnibus crime bill, filled with popular measures, like adding 100,000 police officers to the nation’s streets, a top priority of the Clinton administration.

Through some nimble legislative footwork, the ban’s supporters in the Senate, led by Ms. Feinstein, were able to get a version of the ban added to the crime bill and through the Senate in November 1993.

Although there was pressure from the White House to drop the ban for fear that it might scuttle the entire crime bill, former legislative staff members recalled, its proponents held fast.

“That was courage,” said Michael Lenett, a former counsel to the Judiciary Committee, assigned to Mr. Metzenbaum, who died in 2008. The quarterback of the crime bill was Joseph R. Biden Jr., then a senator from Delaware and chairman of the Judiciary Committee. On Wednesday, President Obama tapped Vice President Biden to lead an interagency effort to develop new anti-violence proposals.

The ban narrowly survived, but the final version represented a series of compromises from what some gun-control proponents originally hoped for, including the sunset provision, a shorter list of explicitly banned guns and a more expansive category of exemptions.

David Yassky, who worked on the ban as chief counsel to the House subcommittee on crime under Mr. Schumer, said some compromises were needed just to pass the bill. “A broader definition of assault weapons would have been safer, would have resulted in fewer highly dangerous weapons making their way through the ban — but there just were not the votes for it,” he said.

Looking back, former staff members who worked on the bill recalled the long political slog, as well as how narrow their window of opportunity was. “To me,” Mr. Lenett said, “the lesson is you have to strike right now.”

Kitty Bennett contributed reporting.

A version of this article appears in print on December 20, 2012, on Page A1 of the New York edition with the headline: Lessons in Politics and Fine Print In Assault Weapons Ban of ’90s. Order Reprints|Today's Paper|Subscribe