Police commandos stormed an apartment in southern Germany after a hostage standoff and found five bodies, including that of the gunman, a spokesman said.
The team was sent in to the apartment after police smelled smoke from the top-floor apartment in Karlsruhe at around lunchtime following a standoff that began at 9 am (0700 GMT).
Inside they found the bodies of the suspect, as well as those of the court bailiff who had sought to evict the man, the locksmith who had accompanied him, the woman who was supposed to take over the apartment and another person, he said.
The man opened fire when the bailiff and others went to his apartment to eject him for failing to pay his rent. Police then blocked off the entire area in the Nordstadt section of the city and called in the police commando teams.
It was not clear whether they had ever managed to make contact with the gunman before the hostages were killed.
One person is reported to have been killed and several others injured after a man took hostages in an apartment in south-west Germany, police said.
Karlsruhe police spokesman Juergen Schuefer said officers had shut down a large part of the city around the building after shots were fired at around 9am local time when two court bailiffs went to evict the occupants of one of the flats.
He said police believe they are dealing with a single armed man but have had no contact with him yet.
They do not yet know how many hostages there are but neither of the bailiffs has been accounted for.