A silent and seething employee went on a bloody rampage at Connecticut Lottery Corp.headquarters Friday, killing four senior lottery officials before committing suicide as police closed in.

Lottery President Otho Brown, 54, and former New Britain Mayor Linda A. Blogoslawski Mlynarczyk, 38, were among the victims of what is believed to be the state's deadliest workplace slaughter.

Also killed were Frederick Rubelmann III of Southington, 40, vice president of lottery operations and administration; and Michael Logan, 33, of Colchester, the agency's information systems director.

The killer used a handgun and a knife. Police identified him as Matthew E. Beck, 35, a state lottery accountant involved in a seven-month dispute with the agency over job duties and pay.

Co-workers said Beck, dressed in jeans and a polo shirt, appeared tormented by something when he showed up for work Friday morning at Connecticut Lottery headquarters at 85 Alumni Road. He sat at his desk refusing to speak to co-workers or to remove his tan leather jacket.

Finally, he stood up from his chair and walked past at least a dozen offices toward the administration suite. It was there, police and eyewitnesses said, that Beck began his killing spree.

``It all happened in only a matter of minutes,'' said state Public Safety Commissioner John Connelly.

Amid the hysterical screams of co-workers who ran in blind terror at the sound of gunfire, witnesses said, Beck showed no emotion as he systematically sought out and killed superiors who had been involved in a union grievance he filed last year.

Police said Logan was the first to die, stabbed in the chest and stomach with a military-style knife. Officials were uncertain Friday whether he was also shot.

Beck then shot and killed Mlynarczyk, the lottery's chief financial officer, with a semiautomatic handgun for which he had a permit.

``We heard, `pop, pop, pop.' I just thought something dropped. People started yelling to get out of the building,'' said Marion Tercyak, a state lottery accountant who worked in the same suite of offices with Beck. ``Security and Ott [Brown] were yelling for people to keep running, to run into the woods.''

After Logan and Mlynarczyk were killed, chaos broke out among some of the more than 100 state workers assigned to lottery headquarters. Unsure of what was happening, employees flooded out of the building and tried to find cover behind cars, trees and bushes. Beck shot Rubelmann inside the building as he tried to direct workers to safety, police and witnesses said.

Outside in the parking lot, Brown was screaming for workers to run into the woods behind the building. From about 50 yards away, workers watched helplessly as Beck chased Brown into an overflow parking lot that was empty of cars.

Barbara Doody, who is also an accountant, said she thought Brown was trying to lead Beck away from the frightened employees.

Brown stumbled and fell to the gravel lot, enabling Beck to catch up to him. Witnesses said Brown pleaded for his life as Beck stared down at him dispassionately.

``I was screaming, `Matthew don't, Matthew don't!'' Doody said. ``Then Otho puts his arm up in the air. That's when Beck walks right up to him and pulls the trigger. There was no expression on Matthew's face. Nothing.''

As police arrived moments later and drew their weapons, Beck put his pistol to his head and pulled the trigger. Beck was airlifted to Hartford Hospital, where he was pronounced dead shortly after arrival.

At an afternoon news conference that attracted more than 100 print and broadcast reporters and photographers to Newington Town Hall, Connelly, the state public safety commissioner, said that Beck suffered from job-related stress and had returned to work Feb. 25 after a four-month medical leave. The leave of absence appeared to be directly related to an unresolved grievance Beck filed in August in which he complained he was forced to perform duties not in his job description, Connelly said.

Beck was performing a computer-related job in Logan's division but was still being paid as an accountant, a position that generally is paid about $2 an hour less than the computer job, according to state records. Beck earned $45,400 a year.