Sen. John McCain, who died Saturday of brain cancer, will be memorialized and buried in private at the U.S. Naval Academy in Annapolis next weekend, his office announced Sunday.

The former Republican presidential nominee and prisoner of war graduated from the academy in 1958 and is one if its most distinguished alumni.

The memorial service is scheduled for 2 p.m. Sunday at the Naval Academy Chapel. He will be buried afterward in a plot next to his Naval Academy classmate and lifelong friend, Adm. Chuck Larson, the only two-time superintendent of the academy (1983-1986, 1994-1998).

Before Larson died of pneumonia in 2014, following two years of leukemia treatments, the admiral reserved the burial plots for himself, McCain and their spouses at the Naval Academy’s cemetery at Hospital Point, overlooking the Severn River, according to the senator’s office.

The Naval Academy said Saturday that it was mourning McCain’s death.

“His life of service to our country is a legacy that will continue to be revered,” the academy wrote on Twitter.

McCain has described his time at the Naval Academy as a "four-year course of insubordination and rebellion." His father and grandfather, the Navy's first father-and-son set of four-star admirals, also attended. His son Jack graduated from the academy and serves in the Navy.

The 81-year-old had been suffering from brain cancer for over a year. In a September “60 Minutes” interview, he spoke of his desires for a burial ceremony in Annapolis.

“You just have to understand that it's not that you're leaving. It's that you — that you stayed. I celebrate what a guy who stood fifth from the bottom of his class at the Naval Academy has been able to do,” he said. “I am so grateful. I — every night when I go to sleep, I am just filled with gratitude.”

Former Presidents George W. Bush and Barack Obama, who blocked the Arizona Republican's own White House ambitions, are among those expected to speak at McCain's funeral.

"The nation mourns the loss of a great American patriot, a statesman who put his country first and enriched this institution through many years of service," said Senate Majority Leader Mitch McConnell, a Kentucky Republican.

On Wednesday, McCain will lie in state at the Arizona State Capitol, where the public is invited to pay their respects. On Friday, McCain will lie in state at the U.S. Capitol in Washington, where a formal ceremony will take place at 11 a.m.

In Maryland, Gov. Larry Hogan ordered that the state flag be lowered to half-staff in honor of McCain.

McCain “will forever remain one of the most valiant heroes our country has ever known. He has long stood as a shining example of doing the right thing and standing up for his principles. His legacy is one of selfless service, grit, and determination,” Hogan said in statement.

The Associated Press and Baltimore Sun Media Group reporter Rachael Pacella contributed to this article.