Both hostages are free and the two prison inmates who took them captive are back in custody in Sweden after a hostage drama that included a demand for pizza for all prisoners in the cell block.
The prisoners barricaded themselves in a guard room of Hallby prison, some 100 kilometres west of Stockholm, media reported.
About 7pm on Wednesday, the first hostage was released, police said. Later in the evening, officials announced that the second hostage had also been released.
Shortly thereafter, the police announced that both of the hostage-takers were back in custody.
"The two suspects have now been detained and taken to police headquarters in Eskilstuna," read a police statement.
The case is being treated as two kidnappings.
According to the report, the two inmates covered surveillance cameras and demanded a helicopter.
The hostages are said to be a man and a woman, while the hostage-takers were murder convicts, according to the newspaper Aftonbladet. They were armed with razor blades.
In the afternoon, according to media, they demanded all 20 inmates from their wing should get pizza with kebab toppings, and in return one hostage could be released.
Shortly afterwards, photos showed police officers putting several pizza boxes into a car. The pizzeria confirmed that 20 kebab pizzas had been taken away.
The police initially only said that a major operation was taking place at the prison and that officers with special authority were on the scene.
In the afternoon, they confirmed on their website that the two inmates had barricaded themselves in a room where two prison guards were also located.
Hallby prison has 98 spaces in security class 1, the highest security level for Swedish prisons, according to the Swedish Prison Inspectorate.
Australian Associated Press