On April 13, 1981, a customer entered the First National Bank of Barrington and went downstairs to the safe-deposit-box vault.

An employee put a key in the cylinder lock to open the customer`s box, and something strange happened: the lock fell into the unopened box.

The bewildered customer was escorted out quickly, and police and the FBI were called. FBI agents looked closely at that box, then at other boxes. They tentatively pushed on the lock of another box, and the lock fell in.

By the time an inventory had been taken, more than $1 million in cash, gold coins and other valuables was reported missing from 74 safe-deposit boxes. None of the loot has been found.

Agent Leroy Himebauch said it was the first successful looting of a safe- deposit vault in a federal bank in the United States.

A week ago a federal jury convicted William Smarto, 44, of northwest suburban Wheeling, of conspiracy and bank burglary in what prosecutors called an almost perfect crime. Smarto is to be sentenced in April and could face 55 years in prison.

Smarto says he is a hairdresser. Federal prosecutors say he is a

''criminal genius,'' the first man to spend the weekend in a bank safe-deposit vault and walk out with $1 million.

Alan Grossman and William Coulson, assistant U.S. attorneys, said Smarto`s escapades at the First National Bank of Barrington and two other suburban banks are a tale of steeled nerves, gall and a cunning criminal mind. In the end, prosecutors begrudgingly concede that though Smarto`s meticulously planned crimes were uncovered, he is intelligent and cool-headed. The story begins in 1978, when Smarto styled hair at the Velvet Brush in Deerfield, a shop he has since sold. ''He was a hairdresser by day and a bank burglar on the weekends,'' Grossman said.

Smarto and his brother rented safe-deposit boxes at the First National Bank of Deerfield and entered repeatedly, according to Grossman.

''They were casing the place, and one would divert the attention of the vault attendant,'' Coulson said. Holes were punched in the alarm system--two sound sensors resembling stereo speakers--on the ceiling and two alarm clocks were hidden in the vault`s false ceiling, he said.

The clock alarms were set to ring after banking hours. ''Someone outside the bank watched to see if the police came,'' Grossman said. ''When no one came, they knew the vault alarm didn`t work.''

On Sunday, July 22, 1979, Smarto crept into the bushes behind the Deerfield bank and removed a ventilation grate, prosecutors said. He dropped into a room just outside the safe-deposit vault. Investigators later found that Smarto had brought in food, a drill, four crowbars, two flashlights, two headlamps, two sledgehammers, three chisels, eight screwdrivers, a vise grip, a hacksaw, goggles and a torch.

A janitor who arrived at the bank heard a noise in a basement conference room. He found Smarto standing on a chair that was on a table. He was drilling into the wall, Grossman said. Plaster and concrete were all over the floor.

Smarto bluffed the janitor, demanding, ''Who`s going to clean up this mess?'' The janitor said he would and left, believing that Smarto was a repairman. Minutes later, investigators believe, Smarto departed, leaving behind his tools and an unfinished hole in the wall.

Months later Smarto and his brother rented safe-deposit boxes at the First National Bank of Barrington. They entered repeatedly. Tools, clothing and alarm clocks were hidden in the false ceiling of the vault, Grossman said. Again the ceiling sound sensors were punched.

On Saturday, April 11, 1981, the regular vault attendant was on vacation, and no one was on duty downstairs. Investigators believe that Smarto used a credit card to get past a glass door leading to the vault. He then crawled on top of the safe-deposit boxes and dropped into the corner, where there was a 24-inch square open space.

''Bank employees did not even know there was a dead space in the corner,'' Grossman said. At 1 p.m. the vault`s heavy metal door closed. ''It was on a time lock and would not open until 7:30 a.m. Monday,'' Grossman said. Ten minutes later the alarm went off. Police arrived and checked the bank. Nothing suspicious could be found. Ten minutes later the alarm went off again. ''This time they became convinced it was a malfunction,'' he said.

Investigators believe that the alarm was set off by Smarto as he crawled out of his hiding place to puncture an unpunched sound sensor.

The vault door opened Monday morning, and everything appeared normal. A bank employee later said she had noticed a man walking through the parking lot with two duffel bags when she arrived that morning. She said she saw the same man a few minutes later in the vault with two more duffel bags and thought he was a repairman.

Once the theft was discovered, investigators determined that after punching out the locks, the thief had replaced all of the cylinders in the boxes and swept up the mess. All of the trash had been hidden in the ceiling so the vault appeared normal when it was opened. The thief was hiding in the corner when the door was opened, investigators said.

''He took the risk that no one would be waiting outside the vault on Monday morning, because the alarm had gone off twice,'' Grossman said. ''He just calmly walked out.''

In the false ceiling, investigators found four flashlights, a sledgehammer, a crowbar, three screwdrivers, tape, batteries, a wire stripper, a trowel, scissors, pliers and four steel bolts.

Smarto`s brother also was charged but has not stood trial because of health problems.

Smarto`s luck changed, however, at the First National Bank of Lake Forest on Sept. 3, 1982. A customer complained that a wooden panel had fallen from the ceiling. When Joseph Korn, superintendent of maintenance, went to replace the panel, he looked into the crawl space. He noticed a man there and climbed down.

Minutes later Smarto was under arrest. Above the washroom ceiling, police found a bottle of water, a radio, an alarm clock, gloves, scissors, two flashlights, pliers, five screwdrivers and a jogging suit. Bank employees later remembered that Smarto visited the washroom often, and they believed that he had weak kidneys, Grossman said.

In the vault`s false ceiling, investigators found tools, including an industrial-size jackhammer and bits and an electric saw to cut the hinges off the safe-deposit boxes.

''He would have gotten away with millions,'' Coulson said.