A United Airlines flight to Denver was diverted after a threat and a suspect is in custody. Photo: Andrew De La Rue

"The crew elected to divert the flight after they discovered a threatening message from one of the passengers," United spokesman Charlie Hobart told CNN.

Royal Canadian Mounted Police took a suspect into custody, according to a Twitter message from the RCMP in Richmond, British Columbia. A spokesman for the RCMP, Corporal Dennis Hwang, didn't immediately return a voicemail message seeking comment on Saturday.

"The crew elected to divert to Vancouver as the nearest available airport," Charlie Hobart, a spokesman for United Continental Holdings Inc said on Saturday in Chicago, in a telephone interview.

The decision was made after a "threatening message" was received, he said, referring questions on the nature of the threat to the RCMP.

Flight operations at Vancouver airport are unaffected, the authority said.

United is "working to re-accommodate the customers as soon as we're able to do so," Hobart said.