Police said they found the bodies inside after storming the apartment in the Germany city of Karlsruhe when they smelled something burning, several hours after a man barricaded himself and the hostages inside.
Authorities initially said three or four had died but said they discovered the body of a fifth victim, a woman, presumed to be owner of the flat, during a search, a spokesman said.
The gunman, who possessed several hunting rifles, is understood to be among the dead.
Two of the other victims included a bailiff and a locksmith. Residents of the building had raised the alarm with police at around 9:00am (0700 GMT) when shots were heard from the home of the hostage-taker who was about to be evicted.
The fifth-floor flat was at the top of an apartment building in a leafy, middle-class neighbourhood, a few miles north of the city centre.
Specially trained police were sent to the scene which had been sealed off.
Two schools and kindergartens are located nearby and several apartment blocks were evacuated, according to the local daily Badische Zeitung.
Karlsruhe, with nearly 300,000 inhabitants, is located near the French border and is home to Germany's Constitutional Court.
Source: Agencies
