In June 1997, a man was shot and killed in a telephone booth in Oakland, Calif. Police had no suspect and no clues except the bullets they took from the corpse.

More than a year later, a police examiner test-fired a weapon taken from two men arrested in Oakland for unlawful possession of a firearm. The examiner entered the results into a computerized database containing ballistics information from thousands of unsolved crimes. Within seconds the search had matched the weapon to the telephone booth shooting. The two suspects confessed.

"In the old days, that case would never have been made," said Ben Wilson, chief of the firearms section at the Bureau of Alcohol, Tobacco and Firearms laboratory in Rockville. But the ATF's Integrated Ballistics Identification System has helped investigators in more than 1,500 cases since 1993, many of them miles apart in geography and years apart in time.

In 1998, police in Connecticut issued a warrant for a suspect in the execution-style murder of a restaurant owner a year earlier, after New Jersey police used the ATF system, known as IBIS, to match the weapon used in the Connecticut crime to the murders of two teenagers in Paterson, N.J.

In 1995, IBIS matched a weapon taken from a D.C. teenager with the murder by a different suspect of a Danville, Va., Winn Dixie supermarket manager a year earlier. In Harrisburg, Pa., state police found that a weapon used in an armed robbery was the same one used in a shooting in the Bronx two years earlier.

In 1997, the International Criminal Tribunal for the Former Yugoslavia sent IBIS 435 shell casings from the site of the 1991 mass execution of 260 people at Ovcara farm near the Croatian city of Vukovar. Two survivors said there were 18 gunmen, and the tribunal wanted ATF to tell them how many weapons were at the site. There were 18, all of them AK-47 assault rifles. One suspect was convicted of war crimes.

The "ballistics test" has been a staple of police work for 75 years. An officer arrests a suspect, fires his gun into a bucket of sand, matches the bullet to the one taken from the murder victim. Case closed. But IBIS has given this American cliche a dimension far beyond anything ever envisioned by the likes of Joe Friday or Perry Mason.

With IBIS, examiners do much more than test-fire weapons. IBIS allows them to feed digitized "signatures" from shell casings or bullets into a database where they can be instantly compared to evidence collected from thousands of disparate crimes committed in different jurisdictions over a period of years.

In the past, investigators hoping to break such a case would have had to check every suspect bullet against every other bullet in their possession. It was time-consuming enough to open all the envelopes in one evidence room. Looking at bullets from another state would have been unthinkable, and no one would have had the time to help out an international war crimes tribunal.

But IBIS has transformed yesterday's waste of time into a matter of a few computer keystrokes: "This is your unsolved case file," Wilson said. "This allows you literally to find a needle in a haystack."

Like fingerprints or DNA profiling, ballistics is based on the principle of uniqueness. Every weapon imparts distinctive grooves, striations, scarring or other marks to both bullets and shell casings whenever someone fires a shot.

With only modest training, a police technician can use IBIS's "acquisition microscope," which automatically adjusts light intensity and positioning as it "acquires" the shell casing or bullet image. From the images, the IBIS software creates the electronic signature that it files to the database.

For bullets, the software looks at grooves worn in the projectile by a weapon's "lands," raised surfaces on the inside of the gun barrel that scar the bullet as it travels upward. These "land engraved areas" are accompanied by a left or right "twist" that imparts spin--and accuracy.

For casings, the software acquires images from the back of a spent cartridge, uniquely scarred when the shell slams against the breech of the weapon as it is fired.

The primer, the small soft metal eye on the casing, is distorted in a distinctive way by the firing pin. The metal that surrounds the primer, known as the breech face, is also marked with readily discernible scars and striations.

A search is almost instantaneous. The software can filter the data for caliber, number of lands, direction of twist and shape of the firing pin--circle, square, rectangle or a distinctive oval that appears only in weapons made by Austria-based Glock Inc.

"Each firearm has unique machine marks," Wilson said, and IBIS will use them to display a list of "probably match," graded 1 to 100, with 100 being the best.

"There's a 90 percent chance that the match will come in at number one or number two," Wilson said, but a trained examiner must make the final judgment with the physical evidence in hand under a microscope. As Wilson explained, only people can testify in court.

IBIS has 48 clients chosen by a special board that evaluates law enforcement requests from all over the country. ATF pays for the equipment from appropriated funds and distributes it free.

Small subscribers may get a $30,000 portable unit that can only acquire images. A fully equipped input and access station costs $240,000. The "hub" station that stores the data costs $330,000.

ATF's Rockville lab serves as the IBIS hub for D.C. police, Prince George's and Montgomery county police, and police in Wilmington, Del. The hub has collected signatures from 19,612 shell casings and bullets since 1993.

And eight months ago, ATF assembled its first network, giving Rockville, New York City, Boston, Newark, Pittsburgh, Philadelphia and Harrisburg, Pa., access to one another's databases.

Eventually ATF hopes to go national, although Wilson acknowledged that "there has to be a traffic cop" to keep operators from needlessly searching far-flung databases.

Still, he said, nationwide access would be useful in many instances: if a suspect is carrying an out-of-state driver's license; if there is drug or arms trafficking between two cities; or if a prominent person is murdered by an imported pro.

Currently, however, Wilson's biggest difficulty is that the FBI has a ballistics technology that competes directly with IBIS, but is not computer-friendly.

Wilson said compatibility may be achieved by the fall, but meanwhile the two systems have created the kind of foul-up that gives the federal government a bad name. D.C. police have both IBIS and the FBI's Drugfire database, but Baltimore and the Virginia suburbs have Drugfire only, while the Maryland suburbs have only IBIS.