A correctional officer is safe after being held hostage at the jail in Sept-Îles, Que., according to provincial police.

On Twitter, the Sûreté du Québec confirmed the hostage situation is over. Police tweeted that the two suspects, aged 22 and 26, had surrendered.

On Wednesday afternoon, inmates at the jail took the officer hostage. Quebec's provincial police were called to the facility around 3 p.m. ET. At that time, the building was evacuated and a security perimeter was set up.

Radio-Canada reports that a man was taken out of the jail in handcuffs around 6:30 p.m. ET.

The building, which houses a detention centre in the basement and the town's court on the main levels, is located in downtown Sept-Îles.

Police have not released many details about the hostage, except that she's a female correctional officer.

Police are also not commenting on the motive of the inmates.

Code red

A lawyer who was inside the courthouse during the evacuation said he's never seen anything like this in 30 years.

Michel Savard said he was asked to leave the building due to a "code red."

"From my experience, I thought that a code red was a hostage-taking, or something like that. Something that isn't good. Something that requires maximum security," he said.

After leaving the building, he was told he could leave for the day.

Long wait for new jail

The town of 25,000 has been waiting for a new detention centre for about 25 years.

Successive governments had promised — but didn't deliver on — a new jail. The Quebec government first announced construction plans in 1989, with the most recent promise coming in 2013.

While construction is now under way, the new jail — located about 10 kilometres away from the current one — has yet to open. According to the government's website, it was due to open in the spring of 2016.

Sept-Îles is located about 650 kilometres northeast of Quebec City.