(CNN) -- A gunman who took people hostage at Estonia's Defense Ministry Thursday was killed during a police operation, officials said.
The man entered the building armed with a firearm and a number of pyrotechnic explosives. a ministry spokesman said.
The ministry is in Tallinn -- the capital of the tiny Baltic nation.
The gunman started shooting randomly in the building and took two ministry employees hostage.
The building was evacuated and the hostages were quickly released when police confronted the suspect, who was killed during the police operation.
No one else was injured in the shooting.
The spokesman identified the gunman as 57-year-old Karen Drambjan, an Estonian citizen of Armenian descent. He is a lawyer and belongs to a left-wing political party.
The ministry spokesman denied reports that the man is a former soldier or ministry employee.
His motive was not immediately known.
People were evacuated from the ministry during the incident and the building's foyer was reportedly filled with smoke.
The ministry will open and operate as normal on Friday.
Estonia, population 1.3 million, is part of NATO. It has 163 troops deployed in Afghanistan, where eight of its service members have died.