A professional motocross rider from Kelowna was seriously injured after an attempted record-setting stunt went terribly wrong Friday night.

Witness videos show Bruce Cook coming just short of a world record-setting double flip, falling from his dirt bike and crashing into a ramp in Hamilton, Ontario’s Copps Coliseum.

Spectators gasped, but later applauded Cook as he was rushed from the scene on a stretcher by paramedics.

It is unclear exactly what injuries he suffered, but they have been reported as serious.

In a message posted on Instagram, Cook said he underwent three hours of surgery Saturday and has been "blown away" by the support he's received since the crash.

"I'll likely be in hospital in Ontario for the remainder of the week at which time I will transfer to B.C.," he wrote. "My mom and dad are here with me helping keep spirits high. I've got this!... There is definitely a smile under that mask."

Lindsey Scott, a friend of Cook’s, told CTV News she spoke with Cook Saturday and that he is is concerned about the extent of his injuries.

“He’s got a really good support system and everybody’s rooting for him and sending him well wishes,” she said. “His injuries have left his future kind of up in the air.”

She called the Kelowna native “the nicest guy you will ever meet.”

The stunt he was attempting had never been done before -- a ramp-to-ramp double front-flip, according to motocross internet forums.

Cook was participating in the Nitro Circus Live North America Tour, an “action-packed extreme sports spectacular,” according to the organization’s website.

According to his biography, he was the first Canadian to ever compete in the X Games best trick competition in 2012, placing seventh.