Former NFL quarterback Jim Kelly was recovering Wednesday night in a New York City hospital after undergoing nearly 12 hours of surgery for oral cancer.

“We successfully removed Mr. Kelly's cancer from his upper jaw and lymph nodes from his neck,” Dr. Mark Urken, the operating surgeon, said in a statement to the Buffalo News. “We then reconstructed his upper jaw. Mr. Kelly is resting comfortably post-operatively.”

The “complicated” surgery was performed at Mount Sinai Hospital, the Buffalo News reported.

According to the News, Kelly sought to have the reconstruction because medication was no longer helping him deal with pain, and no longer wanted to use the prosthesis he had been using since a previous surgery.

In an Instagram post late Wednesday, Jill Kelly – wife of the former Buffalo Bills star – wrote that her husband was facing “a very significant time of recovery.”

Earlier this month, Kelly announced that his cancer had returned after years of remission. He said he was “shocked and deeply saddened” by the news, but vowed to overcome the disease.

He then expressed thanks to his fans and other supporters.

“As our family has faced many trials and triumphs throughout the years, you have blessed us with your prayers. We are asking for those prayers once again," Kelly said. "With all of you by my side, we will fight and win this battle together."

"With all of you by my side, we will fight and win this battle together." — Jim Kelly

The diagnosis came just a few weeks after Kelly celebrated his 58th birthday. Kelly had been cancer-free since September 2014.

He was first diagnosed with squamous cell carcinoma, which led to him having surgery to have a portion of his upper jaw removed in June 2013. Follow-up tests nine months later showed the cancer spread to his sinus, which led to radiation and chemotherapy treatments. Kelly lost 70 pounds while being treated.

The effects of the cancer and treatments led to Kelly having trouble speaking. He could also no longer produce saliva and had lost the sense of taste.

Kelly spent 11 seasons with the Bills before retiring following the 1996 season and has since made Buffalo his home.

He was part of the Bills’ most successful era, in which the team played in four consecutive Super Bowls — all losses — in the early 1990s.

Kelly told the Associated Press that staying upbeat helped him cope in beating cancer. He also refused to feel sorry for himself, which reinforced his desire to share his experiences with others.

“I have no room to complain,” Kelly said. “If tomorrow the good Lord decides that's my last day, then I'm not going to go down with a frown. I'm going down with a smile on my face, knowing that I've gotten everything out of life.”

The Associated Press contributed to this story.