The hostage situation started in the town of Pfaffenhofen in Upper Bavaria at 8.30 am on Monday morning when a 28-year-old man barricaded himself into the third story office of a caseworker at the office.
The young man then threatened the 31-year-old woman with a knife and inflicted a wound on her upper body, police report.
By rolling down the shutters on the upper floor of the building he was able to block off all possible visible contact the police could have established.
What followed was a nerve-wracking standoff between police and the hostage taker, which lasted for several hours.
As a first step the police evacuated everyone who was still in the building. The surrounding area was then evacuated, while special forces (SEK) moving into the cordoned-off zone. Ambulances also arrived to be on standby in the event of casualties.
A negotiating team managed to make contact with the hostage taker via telephone. While the hostage situation was still in progress, a police spokesperson confirmed that the negotiators were trying to persuade the man to allow his captive to leave unharmed.
When the woman asked to be able to speak to a doctor in the early afternoon, the SEK team stormed the building and overpowered the man. No shots were fired in the operation.
"They made the most of a good opportunity," the police spokesman said.
The victim was suffering psychologically in the wake of the incident but had not sustained any serious physical injury, the police announced. The hostage taker was also not seriously injured.
The motive for the hostage taking is still not completely clear, but police have indicated that it had something to do with a conflict over care of the young man’s child. The man is believed to have known the caseworker in a professional capacity.