Two prison inmates in eastern Quebec were arrested Wednesday after they took a female security guard hostage, prompting the evacuation of a courthouse and an hours-long standoff with police.

Authorities said the unidentified guard was uninjured in the altercation.

CBC News reported that the incident began when police were called to the courthouse in Sept-Iles at around 3 p.m. local time. The facility, which houses the jail in the basement and the town's courts on the main floors, was evacuated and a security perimeter was established.

Radio-Canada reported a man in handcuffs was seen being taken out of the jail at around 6:30 p.m local time. Quebec provincial police confirmed that the male inmates, aged 22 and 26, had surrendered and were in custody.

Authorities had no immediate comment on what the motive for the hostage taking might have been.

Sept-Iles, which has a population of around 25,000 people, is located at the mouth of the St. Lawrence River, approximately 400 miles northeast of Quebec City.

In 2013, CBC/Radio-Canada reported that the jail was outdated and had an overcrowding problem. A new jail was supposed to be operational this spring but has not yet opened.

The Associated Press contributed to this report.