John McCain
Sen. John McCain (R-AZ) speaks at a press conference about the National Defense Authorization Act in Washington, Oct. 25, 2017. REUTERS/Aaron P. Bernstein

The U.S. Navy on Thursday dedicated one of its destroyers to Sen. John McCain who is currently battling brain cancer at his home in Arizona.

In a press release that was posted on McCain’s website, Navy Secretary Richard Spencer said, “As a warrior and a statesman who has always put country first, Sen. John McCain never asked for this honor, and he would never seek it. But we would be remiss if we did not etch his name alongside his illustrious forebears, because this country would not be the same were it not for the courageous service of all three of these great men.”

The guided missile destroyer, which was one of the two ships destroyed in a fatal accident in 2017 in the Pacific, was first named after McCain’s father and grandfather when it was launched in 1994.

“Today, we add the story of Senator John S. McCain to the spirit of the mighty vessel which already carries the legacy of his father and grandfather,” Spencer added in the release.

McCain missile destroyer
The U.S. Navy Arleigh Burke-class guided-missile destroyer USS John S. McCain maneuvers alongside the amphibious assault ship USS Bonhomme Richard for a refueling-at-sea in the Philippine Sea, June 14, 2017. U.S. Navy/Mass Communication Specialist Seaman Apprentice Gavin Shields/Handout via REUTERS

According to the Associated Press, three generations of McCains have the same name — John, and all of them have served in the navy.

McCain’s grandfather was a World War II carrier task force commander, while his father was a U.S. Pacific Command commander. The senator served in the military during the Vietnam War as a naval aviator and was captured and held captive for five years.

The ship’s commanding officer Cmdr. Micah Murphy said after Spencer addressed the members aboard, “the crew and guests observed colors. … The flag we flew today, as well as the commissioning pennant that flew during Sen. McCain's visit in Vietnam last year, will be given to him to commemorate this historic occasion.”

Responding to the honor, Sen. McCain said: “I am deeply honored to be added to the name of the naval destroyer USS John S. McCain. … My father and grandfather dedicated their entire lives to their naval service. The greatest honor of my life was to serve in the company of heroes, and I look back with incredible gratitude for my formative years in the Navy. I hope the generations of sailors who will serve aboard the USS McCain will find the same fulfillment that my family does in serving a cause greater than oneself,” according to the press release.

He also took to Twitter to convey his thanks to the military branch.

Ten sailors were killed in August 2017 when the ship collided with an oil tanker in Singapore. The repair of the McCain is going on at Yokosuka Naval Base in south Tokyo. Spencer said the navy hopes to get back the ship by next spring, Fox News reported.