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.

Read More