The gunman who opened fire at the Kronospan factory in Menznau, Switzerland had been a long-term employee of the company and was suffering from psychological problems.
Police have confirmed that three people are dead, including the shooter, while a further seven were injured, six seriously.
While the gunman has not been identified, news website Blick refers to him as 'Victor B' and is a machine operator and a father.
A fellow employee told Swiss newspaper Luzerner Zeitung that the gunman had been experiencing psychological problems for the last 12 months:
"In the last year he has changed. He talked to himself or to people who were not there.
"Often he joined in mid-conversation completely unexpectedly - you could barely talk to him."
Mauro Capozzo, Kronospan chief executive, said the man had been "with us for more than 10 years - a quiet man, no other incidents involving him are known".
The shooting took place at around 9am local time in the wood processing factory. Lucerne criminal police chief Daniel Bussmann said the 42-year-old gunman drew his pistol and started firing at people.
Speaking at a press conference, he offered his condolences to those either killed or injured by the shooter. He said the motive is still under investigation and that the suspect had been killed.
Officials said the massacre took place in the workshop, the canteen and the connecting passageway between the two areas.
The company's Menznau factory has around 450 employees and there are no details regarding why the gunman opened fire - Capozzo said no one had been laid off recently.
He said no one could understand what had happened and offered his deepest condolences to friends and family of the victims. A service for those killed will be held tomorrow, he added.
Blick said Kronospan had announced cuts to production that would threaten job losses - the company said these were due to poor crop conditions last autumn.
Switzerland has one of the highest rates of gun ownership in the world - around one in four people own a gun - yet crimes relating to firearms are very low; there were 24 gun killings in 2009.