His 15 year old son was released a couple of hours earlier after over 24 hours in the room.
The man, who was due to be sent back to his homeland on Monday, has now been taken into custody and faces charges of kidnapping.
“The man gave himself up of his own free will,” said Tomas Pärlklo, press spokesman at Blekinge police.
Pärlklo told Dagens Nyheter that he came out after “long and drawn-out negotiations”.
“You could say that the tactic we chose has been a success,” he added.
The man, said to be in his forties and from Azerbaijan, had holed himself up in a treatment room, a former house in the grounds of the hospital. His son had been receiving psychiatric treatment there and staff raised the alarm on Sunday morning when the man began brandishing what appeared to be bottles of petrol and a cigarette lighter.
Emergency services rushed to the scene and police began negotiations through an interpreter. The rest of the building was evacuated.
Officers from Sweden’s elite SWAT unit, NI, who are specially trained to deal with hostage situations, arrived at the hospital on Sunday evening bringing the total number of police at the scene to over twenty.
“As long as we can communicate with the man we can avoid having to use force,” said Tomas Pärlklo earlier on Monday. “On the other hand we can’t talk to him forever.”
The family’s application for asylum was rejected by the Migration Board last November, a decision which was apparently confirmed a few weeks ago. On Thursday they were told that they would have to leave Sweden on Monday.
The family’s legal representative, Kristian Andersson, said that the man has been active in an opposition party in Azerbaijan and feared being arrested by the authorities there.
“The whole family has felt terrible,” Andersson told news agency TT. “This is a very stressful situation.”