BATAVIA, N.Y. — Buffalo Bills Hall of Fame quarterback Jim Kelly says he has been diagnosed with cancer in his upper jaw bone and will have surgery June 7.

Kelly has squamous cell carcinoma, but recent tests show that the cancer is isolated in his jaw and has not spread to other parts of his body.

“The past couple of weeks have been difficult for me,” Kelly said. “Because of the nature of social media, I thought it would be best to share with everyone what has been going on with my health.”

The announcement was made Monday morning, just before the start of the quarterback’s Kelly For Kids charitable foundation’s annual celebrity golf tournament.

“Doctors have told me that my prognosis for recovery is very good,” he said.

Kelly spent 11 seasons with the Bills before retiring following the 1996 campaign. He still holds nearly every significant career franchise passing record: 35,467 yards, 237 touchdowns and 26 300-yard games.

“The first thought is you say a prayer that everything works out OK,” said Bill Polian, former general manager of the Bills. “Secondly, he didn’t earn a reputation as the toughest guy ever to play quarterback for no reason at all. So if anybody can overcome this, Jim can. He takes challenges head on.”

Kelly was inducted into the Pro Football Hall of Fame in 2002.

“I am extremely confident in my road to recovery,” Kelly said. “I plan to tackle this challenge head on, as we Kellys always do, with toughness perseverance and faith.”

Concerns about the 53-year-old’s health were first raised last week when his wife, Jill Kelly, posted a message published on imgur.com. Without going into detail, Jill Kelly noted that the family was going through a “more serious battle under our roof” and asked followers to pray for her husband “for healing.”

Later, a youth sports foundation in Sioux Falls, S.D., announced that Kelly would not be able to attend the Hy-Vee/Sanford Legends banquet on June 13 for personal reasons.

Kelly has encountered numerous health problems over the past few years and has had surgery to correct back, neck and hernia problems.

Then, in mid-March, Kelly revealed in an interview with the State Journal-Register of Springfield, Ill., that he recently had surgery to remove a cyst — which he’s described as being “the size of a nickel” — from his gums and nasal cavity. As part of the operation, doctors had to pull out his front teeth, Kelly said.

Kelly appeared to be having no setbacks in his recovery after making several public appearances over the past month.

Kelly was in good spirits attending rookie quarterback EJ Manuel‘s first news conference at the Bills’ facility on April 26, a day after Buffalo selected the player in the first round of the draft.