Auburn University star gymnast Sam Cerio has undergone surgery on both knees following her gruesome injury during her complicated floor routine on Friday.

The video of her injury went viral, which showed the 22-year-old landing awkwardly when attempting a handspring double front-flip, buckling both her knees in the process.

The aerospace-engineering student has since announced her retirement from the sport in an emotional Instagram post.

"Friday night was my final night as a gymnast. After 18 years I am hanging up my grips and leaving the chalk behind.

"I couldn’t be prouder of the person that gymnastics has made me to become.

"It’s taught me hard work, humility, integrity, and dedication, just to name a few."

She then goes on to thank the University gymnastics team for the opportunities she was given in the sport.

"Thank you Auburn family for giving me a home and a chance to continue doing the sport that will always be my first love.

I am honored to have had the privilege to represent the navy and orange AU for the past 4 years with my team by my side."

A photo has since been shared on Twitter of Sam smiling after undergoing the surgery on Monday, with Louisiana State University President F King Alexander, and she is hoping to make a full recovery before her wedding in two months time.

It was initially reported that the Auburn University senior broke both her knees when landing badly, but Auburn University gymnastics coach Jeff Graba has said no bones were broken in the incident, but instead she suffered severe ligament damage to both her knees, as well as dislocating both knees.

Messages of support for the gymnast have flooded in, from sympathising strangers to fellow gymnasts and teammates, and Cerio has recently thanked everyone for their support in an Instagram story post.

"All, I wanted to reach out and thank everyone who has sent me encouraging messages. I truly appreciate all the support and prayers that i have received! I am doing well right now and getting lots of rest! From the bottom of my heart, thank you so much!"

Here's hoping Sam makes a speedy recovery in time for her wedding.