Quebec provincial police say a hostage-taking at a courthouse in a remote Quebec town on Wednesday ended after a few hours.

Police say two convicts took a female correctional officer hostage in Sept-Iles before eventually surrendering.

She was not hurt, said police spokesman Helene Nepton.

Story continues below advertisement

Two men aged 22 and 26 are expected to appear in court Thursday.

The building housing the courthouse has a detention centre in the basement and that is where the hostage-taking occurred.

It was unclear whether the convicts surrendered after a confrontation with police.

Sept-Iles is about 650 kilometres northeast of Quebec City.