A heavily armed employee shot and killed seven co-workers today in the offices of a suburban Boston Internet company, "an incredible workplace tragedy" that may have stemmed from a tax dispute with the IRS, according to prosecutors and witnesses.

Amid Christmas wreaths and other holiday decorations, authorities said, Michael M. McDermott, 42, was armed with an assault rifle, a 12-gauge shotgun and a semiautomatic pistol as he methodically gunned down colleagues in the first-floor offices of Edgewater Technology Inc., an Internet consulting firm about 10 miles north of downtown Boston.

Four women and three men were shot dead, but none of the other 80 workers inside the building was injured, officials said.

"It appears to have been aimed at individuals, as opposed to random spraying," Middlesex County District Attorney Martha Coakley said tonight, calling it "an incredible workplace tragedy."

Coakley said detectives are investigating whether the shooting was related to moves by Edgewater and the Internal Revenue Service to garnish McDermott's wages for back taxes, just one of the financial and personal problems that had recently beset him.

McDermott, who has worked as a software tester at Edgewater since at least March, recently skipped out of one apartment while owing rent and moved into a new apartment without his wife, according to acquaintances and officials.

Prosecutors said the rampage began at about 11 a.m.--more than two hours after McDermott arrived for work--when he calmly walked into the main reception area and, from 10 feet away, shot the receptionist. Coakley said McDermott proceeded to the nearby accounting section, where he began shooting others using the assault rifle and the shotgun. Five of the seven killed were in the accounting department, authorities said, and two were in the reception area.

McDermott had an angry outburst in the accounting department last week over the prospect of losing some of his wages, the Associated Press quoted an unnamed employee as saying. He apparently felt the company was not doing enough to take his side against the IRS, the employee said.

In a statement last night, the company said that "his actions apparently stem from occurrences in his personal life. We deeply regret that Mr. McDermott's problems manifested in actions against the company and its employees.

"There was no way to anticipate his actions or any apparent reasons to restrict his access to the building."

The gunfire sent workers at Edgewater and neighboring companies scurrying for cover until police and SWAT officers surrounded the three-story building, a converted former factory known as Harvard Mill.

Coakley said officers found McDermott sitting "nonresponsive" in a chair in the reception area, his fully reloaded weapons at his side. He did not say a word as police apprehended him, officials said. McDermott, described as a large man who stands 6-foot-2 and weighs nearly 300 pounds, is scheduled to be formally charged with seven counts of murder Wednesday morning.

The slaughter shocked this modest Boston suburb, which had not had a murder for a dozen years. Located on the fringe of the high-tech corridor that rings the city, Wakefield is a picture-postcard New England town with a small lake for windsurfing in the summer and homes dating to the 18th century.

"Clearly, it's a horrific event," said Wakefield Police Chief Stephen Doherty.

Today's killings were the latest in a string of deadly workplace shootings, including a November 1999 rampage in Honolulu that also left seven dead.

Mike Stanley, a team project leader at Edgewater, told reporters that McDermott had been coming in late and that his performance wasn't as good as it could have been. He said McDermott was kidding around with co-workers not long before the shootings.

"He was joking with a bunch of people before he went on the rampage," Stanley said. "It seems like a random, ridiculous thing."

But Stanley also described McDermott as "strange" and "quirky," adding: "Of all the people that I thought could have done this, it was him."

Employees at Select Appointments North America, which occupies the floor above Edgewater, huddled in the company boardroom until police swarmed into the building and ordered everyone to leave.

"A number of employees heard the gunshots, but we still didn't realize it was this bad," said Ron Fuccillo, chief financial officer at Select Appointments. "We just thought someone was getting robbed or something, nothing like this. I never in a million years thought something like this would happen."

Fuccillo said he did not know McDermott well, only that he "was a big guy with a beard. We didn't notice anything unusual about him."

Edgewater employee Nancy Pecjo said in an interview at her Wakefield home after the shooting that the company was a close-knit workplace, but that she knew McDermott only in passing. Pecjo, who is expecting her second child, began a maternity leave last week.

"My friends said it was just horrifying because you could hear the gunshots but you couldn't tell who it was or where it was coming from," said Pecjo, who visited a local church that had been turned into a staging center for the police investigation into the shooting. "This one was my lucky charm, but I wish I could have done something for the people who were there and couldn't get out of the way."

Shirley Singleton, Edgewater's chief executive, said: "Everyone at the company is shocked and devastated at the loss of our friends today. . . . We extend our deepest sympathies to the victims' families at this tragic time."

Until the end of October, McDermott lived in a rented condominium south of Boston, in East Weymouth, where he shared a lease with his wife, Monica, according to the condo's owner, Saburo Imura. McDermott and his wife had been chronically late paying their rent over the years, and McDermott skipped out without paying for September and October, at $840 a month, Imura said.

"I even offered to sell him the condo, but he said he had a new job" in the Wakefield area far from East Weymouth, Imura said. "I'm so shocked. Every time I talked to him, he sounded like a very intelligent, sensible guy."

Imura said the McDermotts had lived at the East Weymouth address for 10 years and, as far as he knew, were still together when their lease expired.

But Coakley said McDermott lived alone in an apartment in Haverhill, a suburb near Wakefield. Marjorie Richardson, who lives in the same building, agreed that McDermott "was living alone as far as I know" since he moved in about two months ago.

Police investigators obtained search warrants for the Haverhill apartment this afternoon.

The shooting marked a tragic end to a grim year for Edgewater Technology, an 8-year-old Internet firm that has seen its stock price plunge to half its peak value of $12.06 a share in March.

A large wreath with red ribbons and gold holiday baubles decorated the lobby, and a white sheet covered the main doorway leading into Edgewater's offices. Employees had fled in a hurry, leaving laptops and briefcases on desks and chairs, phone message lights blinking and computers turned on.

"There was a wall between me and what happened," said one employee, who asked not to be identified. "I just heard gunshots and ran out of the building."

Counselors and members of the clergy from across the area rushed to nearby St. Joseph's Church, where co-workers, family members and friends gathered for support as ambulances idled outside. Police investigators organized Edgewater employees according to where they were in the offices at the time of the shooting and interviewed them one by one in the church cafeteria.

It has been a difficult year for e-business consultants such as Edgewater, which was bought in May 1999 by Staffmark Inc. of Fayetteville, Ark., a much larger company that employed about 2,000 people and had revenue last year of about $1 billion.

But since then, Staffmark formally changed its name to Edgewater Technology Inc. and has been selling off its staffing-related businesses to focus on an Internet business strategy, laying off 80 employees and closing 12 offices in the process, according to industry analysts. This fall, the company announced another 25 layoffs and the move of its headquarters to Wakefield.

"A year ago, this was a brilliant decision," one analyst said, "but by the time they executed it, the party was over" for e-business consulting firms.

Ferdinand reported from Wakefield, Eggen from Washington. Staff writer Yuki Noguchi and staff researcher Lynn Davis contributed to this report.

Major Shootings In Workplace Since 1995

The following major workplace shootings preceded yesterday's killing of seven people at Edgewater Technology Inc. in Wakefield, Mass.:

* March 20, 2000: Fired employee Robert Harris, 28, fatally shot five people at a Dallas-area car wash. Harris was convicted and sentenced to death.

* Dec. 30, 1999: Authorities said housekeeper Silvio Izquierdo-Leyva, 36, fatally shot five co-workers at Tampa's Radisson Bay Harbor Hotel. He pleaded not guilty.

* Nov. 2, 1999: Copier repairman Byran Uyesugi, 40, fatally shot seven people at a Xerox Corp. facility in Honolulu. He was convicted and sentenced to life in prison.

* Aug. 5, 1999: Truck driver Alan E. Miller, 35, fatally shot two co-workers at a Pelham, Ala., office, then killed a former co-worker. Miller was convicted and sentenced to death.

* July 29, 1999: Former day trader Mark Barton, 44, killed nine people at two Atlanta brokerage offices and later committed suicide.

* March 6, 1998: Former Connecticut Lottery Corp. accountant Matthew Beck, 35, fatally shot four lottery executives, then himself.

* Dec. 18, 1997: Fired employee Arturo R. Torres, 43, killed four former co-workers at a maintenance yard in Orange, Calif., and was shot to death by police.

* Sept. 15, 1997: Fired assembly line worker Arthur H. Wise, 43, allegedly opened fire at an Aiken, S.C., parts plant, killing four. His trial is pending.

* April 24, 1996: Firefighter Kenneth Tornes killed four superiors at a Jackson, Miss., firehouse. Tornes died on death row.

* April 3, 1995: Former employee James Simpson, 28, fatally shot five people at a refinery inspection station in Corpus Christi, Tex., then killed himself.

* July 19, 1995: City electrician Willie Woods fatally shot four supervisors at C. Erwin Piper Technical Center in Los Angeles. He was sentenced to life in prison.

-- Associated Press