Inmates at a maximum-security prison in northeast Brazil, who had taken 122 hostages during a riot, released all their remaining captives Sunday, officials said.