BERKELEY, CALIF., SEPT. 27 -- A gunman with a history of psychiatric problems opened fire early this morning in a crowded bar, killing one University of California student and taking dozens hostage in an all-night standoff less than half a block from some of the campus's biggest dormitories.

Berkeley police said Mehrdad Dashti, 29, an Iranian immigrant, was shot to death by six officers who burst into Henry's bar and used what Police Chief Dash Butler called "a flash-bang device" to cause distraction while the hostages fled.

"He was apparently undergoing some type of psychotic episode," Butler said. "The individual wafted in and out of lucidity, so his requests really weren't coherent."

Butler declined to elaborate on reports that Dashti had demanded during the night that San Francisco Police Chief Frank Jordan appear on local television and, as a police officer put it, "moon the camera."

"He had some grudge against the government," said Berkeley Police Lt. Jim Polk, who was called to the popular off-campus bar at 1 a.m. PDT and spent six hours in a fruitless effort to negotiate by telephone.

"He would only talk through one of the hostages," Polk said. "He said the government owed him a tremendous amount of money, and he was willing to take several states in exchange."

Police and city officials also said women held hostage had been sexually abused, but they declined to confirm reports that some of the men had been pressured at gunpoint to humiliate the women sexually.

"These women, in particular, have been assaulted and traumatized once already, and for you to inquire in any detail as to what actually happened may be an additional trauma for them," Fred Medrano, the city mental health director, told reporters.

This has been an upsetting month for the UC-Berkeley campus. On Sept. 3, three students died in a fraternity house fire, and nine days ago the campus was emptied during a bomb scare. On Sept. 16, a disabled student died when his wheelchair tipped and spilled him during a campus rock concert.

The gunman's initial burst of fire came about 12:30 a.m., when he entered the bar and reportedly pulled from a briefcase what Butler called "a number of weapons," including an MAC-10 machine pistol.

John Nicholas Cheehy, a UC senior from nearby Lafayette, was wounded and later died. Seven others were wounded, including a Berkeley police officer, and students who managed to escape said that, during the standoff, the gunman permitted the injured to leave.

Among the first people shot was Finley Tomlinson White, 21, a legal-studies major, who said, "He didn't really aim real well. He was just kind of shooting in my general direction." White was hospitalized in guarded condition.

"For some reason, he had something against blonds, Caucasian women and blond-haired, blue-eyed men," hostage Douglas Moore, 25, a Henry's bartender, told reporters. "He accused the women of showing too much leg . . . . He had something against Americans."

Dashti's two-bedroom apartment about a mile from campus was cluttered today with cassette tapes of what Fred Smith, 19, a UC student who rented one of the bedrooms, took to be Iranian music. A living-room shelf included a Farsi-English dictionary and an Advanced Learners Dictionary of Current English.

In a small hall closet, two plastic bags held bullets and shells, and near them lay a pistol-cleaning kit and an updated National Rifle Association gun guide.

"He was just an avid collector of guns," said Smith, who added that Dashti regularly visited a nearby target range, occasionally worked as a carpenter and said he planned to marry soon.

"There was no indication that he was anything out of the ordinary in terms of his dating, his sexual preferences, anything . . . . He was a really nice guy, easy to get along with," Smith said.

In Dashti's bedroom, among copied correspondence and records, was a 1988 county form in which he was labeled, over a mental-health clinician's signature, as a "paranoid schizophrenic."

There were copies of his letters to President Bush, San Francisco Mayor Art Agnos, Chief Justice William H. Rehnquist and someone identified as "Person in Charge." To the latter, he wrote by hand:

"American citizens have been using a phenomenon known . . . as mass mental telepathy to get a so-called 'Universal' education, exchange their knowledge and information, learn about present existing problems on earth . . . . We want the United States government to pay for this service . . . . $11 trillion . . . and . . . . we are interested in buying California, Oregon, Washington, Alaska and . . . some Russian land as well."

Special correspondent Kraig Debro contributed to this report.