Washington CNN  — 

In a lofty and at moments pointed speech, Sen. John McCain on Monday cautioned against the US turning toward “half-baked, spurious nationalism” during an event honoring the war hero’s contributions.

Reflecting on his decades-long political history, McCain warned that to “fear” the world the US has led for the better part of a century, “abandon the ideals we have advanced around the globe” and “refuse the obligations of international leadership … for the sake of some half-baked, spurious nationalism cooked up by people who would rather find scapegoats than solve problems” is unpatriotic.

“As unpatriotic,” he continued, “as an attachment to any other tired dogma of the past that Americans consigned to the ash heap of history.”

The remarks came after McCain was honored with the Liberty Medal by the National Constitution Center in Philadelphia, months after being diagnosed in July with an aggressive form of brain cancer.

McCain used the moment – meant to mark his service to country – to warn US leadership against moving backward toward nationalistic, “America First” instincts espoused by some of President Donald Trump’s key advisers, without referring to Trump or his team by name. If allowed to take root, McCain cautioned, those tendencies could relegate the US to a backseat on the world stage, leaving a vacuum of power in its wake.

“We live in a land made of ideals, not blood and soil,” McCain said. “We are the custodians of those ideals at home, and their champion abroad. We have done great good in the world. That leadership has had its costs, but we have become incomparably powerful and wealthy as we did. We have a moral obligation to continue in our just cause, and we would bring more than shame on ourselves if we don’t. We will not thrive in a world where our leadership and ideals are absent. We wouldn’t deserve to.”

During a radio interview with Chris Plante on “The Chris Plante Show,” Trump said Tuesday he heard the criticism and warned “people” – namely McCain – to be careful.

“He was taking shots at your again yesterday,” Plante said. “You heard what he said yesterday, Sen. McCain?”

“Yeah, well I hear it. And people have to be careful because at some point I fight back,” Trump said. “I’m being very nice. I’m being very, very nice. But at some point I fight back and it won’t be pretty.”

When asked about Trump’s comments, McCain responded on Capitol Hill saying, “I’ve faced far greater challenges than this.”

Former Democratic Vice President Joe Biden, who is the chair of the Constitution Center, bestowed on Monday night the medal on his former Senate colleague, a US Navy aviator who was captured and held as a prisoner of war during the Vietnam War.

In his own remarks, Biden nodded to McCain’s diagnosis as well as his history serving in the US military.

“John, you have broken many times, physically and otherwise, and you have always grown stronger, but what you don’t really understand in my humble opinion is how much courage you give the rest of us looking at you,” Biden said.

McCain was elected to Congress in 1982, and over his decades in politics has served in both the US House of Representatives and the Senate.

The veteran lawmaker was honored with the medal “for his lifetime of sacrifice and service,” according to a Constitution Center description of the event.

Former President Barack Obama tweeted Monday congratulating McCain on the award.

“I’m grateful to @SenJohnMcCain for his lifetime of service to our country. Congratulations, John, on receiving this year’s Liberty Medal,” Obama wrote.

McCain, who also serves as the chairman of the Senate armed services committee, shared a statement on the honor on Twitter: “I’ve been blessed to spend my life serving something more important than myself, of being a bit player in the story of America #LibertyMedal”

The evening was also filled with patriotic anecdotes and stories from McCain’s personal narrative. McCain served in US Navy until 1981, and was famously a prisoner of war at Hỏa Lò Prison, nicknamed the Hanoi Hilton.

This summer, the Arizona senator was diagnosed with a primary glioblastoma, an aggressive type of brain tumor.

This story has been updated to add additional developments.

CNN’s Dan Merica and Kristin Wilson contributed to this report.