Senator John McCain passed away Saturday after battling brain cancer, according to a statement from his office. He was 81.

McCain was with his wife Cindy and their family when he passed in the afternoon, the statement said.

"My heart is broken. I am so lucky to have lived the adventure of loving this incredible man for 38 years," said Cindy McCain in a tweet. "He passed the way he lived, on his own terms, surrounded by the people he loved, in the the place he loved best."

McCain's daughter Meghan asked for prayers and said she takes comfort that her dad "wakes today to something more glorious than anything on this earth."

"My father's passing comes with sorrow and grief for me, for my mother, for my brothers, and for my sisters," said Meghan in a tweet. "He was a great fire who burned bright, and we lived in his light and warmth for so long. We know that his flame lives on, in each of us."

After his diagnosis in July of 2017, McCain continued serving as a senator for Arizona. It was announced on Aug. 24 that after battling brain cancer for more than a year, McCain would be ending medical treatment.

A politician, servicemember, husband and father, McCain was known for his strength of character and service to the U.S.

McCain followed in the footsteps of his father and grandfather, taking his place at the Naval Academy in 1954. He developed a reputation for being the life of the party and misbehaved frequently, graduating fifth from the bottom of his class.

But it was McCain’s fortitude after joining the Navy that would define him. While on a mission in North Vietnam in 1967, his plane was shot down. McCain deployed his parachute and plunged into a lake, breaking his leg and both arms. After landing in the lake, North Vietnamese beat him and took him to a prison.

While a prisoner of war, he suffered brutal beatings and botched medical treatment that left him on the brink of death, with scars that would last a lifetime. It was at a POW hospital that a French television reporter filmed an iconic interview with McCain, badly injured and lying in a bed.

Eventually, he recovered from injuries and infection, only to spend two years in solitary confinement, where he used codes to communicate with other prisoners.

In 1968, he was offered early release because his father was a high-ranking commander. But McCain refused to leave, citing the military code of conduct requiring prisoners of war be released in the order they were captured. He was brutally tortured and eventually signed an anti-U.S. confession at the request of his captors – a decision he would later describe as dishonorable.

He was released in January of 1973, almost six years after his capture. He served in the Navy until 1981.

McCain was married to Carol Shepp from 1965 until 1980, when the two divorced and he married his second wife, Cindy Hensley. They moved to Phoenix, Arizona, where McCain would begin his political career and serve there for more than 30 years.

McCain, a Republican, won an Arizona House seat in 1982. In 1986, he would go on to win an Arizona Senate seat. In 2000, McCain ran for president, but lost the nomination to George W. Bush. In 2008, he ran again, winning the nomination but eventually losing the general election to Barack Obama.

During his decades of public service, “The Maverick” developed a reputation as a free-thinker who held firm to his own beliefs and wasn’t afraid to question his party. He was a strong advocate for his state of Arizona and defense issues.

Outside of his work, McCain was known for his love of the outdoors and commitment to his family.

He is survived by his wife Cindy and his children Meghan, Jack, Jimmy, Bridget, Doug, Andy and Sidney.

Contributing: AZ Central and Lindsay Maizland, TEGNA