The armed gunman who caused a nine-hour standoff at the Fairmont Pacific Rim hotel Monday morning has been arrested.

Const. Brian Montague said a distraught man entered the hotel waving a handgun at 2:30 a.m. Police quickly locked down the hotel and guests were advised to stay in their rooms.

The 28-year-old Surrey man with a history of mental illness, who is known to police, was contained in a public area of the hotel as negotiators spoke with him.

Police said the man was arrested and taken to hospital with minor injuries at around 12:15 p.m. Due to his mental health history, police were concerned he may harm himself.

According to police, the man now faces possible weapons-related charges.

Hotel management confirmed to CTV News that 90 per cent of hotel guests and residents in 200 rooms were safely evacuated by noon.

In a testament to the power of social media, the hotel used Twitter to evacuate a bride who couldn’t get to her wedding because she was trapped in one of the rooms.

“There is a bride trapped inside the #PacificRim right now that needs to get to her wedding! Please help her!!!!,” @zahfparoo tweeted.

The Fairmont Pacific Rim responded, “Please let us know room number and we will ensure she is evacuated,” and the bride was safely escorted out of the hotel and to her wedding.

Montague confirmed everyone who wanted to leave the hotel was evacuated.