The 80-year-old Republican has glioblastoma, an aggressive cancer, according to doctors at the Mayo Clinic in Phoenix. The senator and his family are reviewing further treatment, including a combination of chemotherapy and radiation.
"On Friday, July 14, Sen. John McCain underwent a procedure to remove a blood clot from above his left eye at Mayo Clinic Hospital in Phoenix. Subsequent tissue pathology revealed that a primary brain tumor known as a glioblastoma was associated with the blood clot," his office said in a statement.
About 20,000 people in the U.S. each year are diagnosed with a glioblastoma, a particularly aggressive type of brain tumor. The American Cancer Society puts the five-year survival rate for patients over 55 at about 4 percent.
The tumor digs tentacle-like roots into normal brain tissue. Patients fare best when surgeons can cut out all the visible tumor, which happened with McCain's tumor, according to his office.
That isn't a cure; cancerous cells that aren't visible still tend to lurk, the reason McCain's doctors are considering further treatment including chemotherapy and radiation.
The senator and chairman of the Armed Services Committee had been recovering at his Arizona home. His absence had forced Majority Leader Mitch McConnell, R-Ky., to delay action on health care legislation.
In a statement, McConnell said: "John McCain is a hero to our Conference and a hero to our country. He has never shied from a fight and I know that he will face this challenge with the same extraordinary courage that has characterized his life. The entire Senate family's prayers are with John, Cindy and his family, his staff, and the people of Arizona he represents so well."
McCain was the GOP's presidential nominee in 2008, when he and running mate Sarah Palin lost to Barack Obama. A Navy pilot, he was shot down over Vietnam and held as a prisoner for 5 ½ years.
Doctors say McCain is recovering from his surgery amazingly well and his underlying health is excellent, according to the statement.
His office disclosed the removal of the blood clot late Saturday and said the senator was awaiting pathology reports. In the past, McCain had been treated for melanoma.
In a statement on Twitter, his daughter, Meghan McCain, said: "My love for my father is boundless and like any daughter I cannot and do not wish to be in a world without him. I have faith that those days remain far away."
With his irascible grin and fighter-pilot moxie, McCain was elected to the Senate from Arizona six times, but twice thwarted in seeking the presidency.
An upstart presidential bid in 2000 didn't last long. Eight years later, he fought back from the brink of defeat to win the GOP nomination, only to be overpowered by Obama. McCain chose a little-known Alaska governor as his running mate in that race, and helped turn Palin into a national political figure.
After losing to Obama in an electoral landslide, McCain returned to the Senate, determined not to be defined by a failed presidential campaign. And when Republicans took control of the Senate in 2015, McCain embraced his new job as chairman of the powerful Armed Services Committee, eager to play a big role "in defeating the forces of radical Islam that want to destroy America."
Throughout his long tenure in Congress, McCain has played his role with trademark verve, at one hearing dismissing a protester by calling out, "Get out of here, you low-life scum."
McCain stuck by the party's 2016 presidential nominee, Donald Trump, at times seemingly through gritted teeth — until the release a month before the election of a lewd audio in which Trump said he could kiss and grab women. Declaring that the breaking point, McCain withdrew his support and said he would write in "some good conservative Republican who's qualified to be president."
He had largely held his tongue earlier in the campaign when Trump questioned his status as a war hero by saying: "He was a war hero because he was captured. I like people who weren't captured."
McCain said that was offensive to veterans, but "the best thing to do is put it behind us and move forward."
AP Medical Writer Lauran Neergaard and writer Nancy Benac contributed to this report.