A gunman who killed a college student in a hostage standoff apparently stockpiled his weapons legally despite a history of criminal and mental problems, officials said Friday.

Mehrdad Dashti was killed Thursday by police after a night of terror and sexual perversion at a popular student tavern near the University of California in Berkeley.The attack by the heavily armed man prompted calls for tighter gun control. "Either this man with a history of being severely mentally disturbed was able to go in and legally buy a gun, or someone bought them for him and the gun registration laws aren't worth the paper they're written on," said Berkeley Mayor Loni Hancock.

Dashti, 30, shared an apartment with Fred Smith, who described him as a devout Moslem who kept a 9mm semiautomatic pistol, a .45-caliber handgun, a .22-caliber pistol and a semiautomatic rifle.

Dashti seized control of Henry's Publick House & Grille at the Durant Hotel, where he held 33 people hostage. Armed with three pistols and firing intermittently, he wounded several people and killed UC Berkeley student John Nicholas Sheehy, 22.

He harangued American women as "slutty" and singled out blonde women for sexual abuse.

The standoff ended when police stormed the bar and killed Dashti. Of the nine people Dashti wounded, four remained hospitalized Friday, listed in good condition.

The Iranian-born killer emigrated to the United States in the late 1970s and established permanent residency status by marrying an American woman in 1984. They divorced in 1987.