A 29-year-old man who Mounties say barricaded himself inside a Kamloops, B.C. restaurant after receiving his bill has been arrested after a nearly an 11-hour standoff with police.

The incident began at around 4 a.m. after the man went for breakfast at the Denny's on Columbia Street near 6th Avenue, the RCMP said in a statement issued Thursday.

When he was given his bill, he made some type of threat, police said.

Mounties have not provided specifics on what he is alleged to have said to his server, but the server alerted other employees and customers and everyone left the building, leaving the man alone inside.

Police were called to the scene, and when they arrived, the man closed the restaurant's blinds. At one point, the RCMP said, he went out one of the doors and was "brandishing a knife." He was confronted by police and went back inside, they said.

As a precaution, the restaurant's natural gas was shut off and nearby roads were closed. Officers also secured nearby homes.

The restaurant was surrounded by officers who spent much of the day trying to communicate with the man and convince him to surrender.

At around 2:45 p.m., the RCMP's Emergency Response Team entered the restaurant and took the man into custody.

Police say the man is from Kamloops and was previously known to them.

The case has been forwarded to the BC Prosecution Service, which will determine what charges could be laid.

The area around the Denny's was closed to motorists for several more hours as officers worked to make sure the building was safe.