Senator John McCain blasted “half-baked” nationalism and praised international cooperation in a speech Monday night that appeared to contrast President Trump’s emphasis on putting “America first.”

The former POW and Arizona Republican called the United States “the last best hope on earth” while giving an acceptance speech for the National Constitution Center’s Liberty Medal, according to Politico.

McCain said it was the country’s duty to lead instead of blaming others for our problems.

“To fear the world we have organized and led for three-quarters of a century, to abandon the ideals we have advanced around the globe to refuse the obligations of international leadership and our duty to remain ‘the last best hope of earth’ for the sake of some half-baked, spurious nationalism cooked up by people who would rather find scapegoats than solve problems is as unpatriotic as an attachment to any other tired dogma of the past that Americans consigned to the ash heap of history,” Mccain said, according to the paper.

McCain added that the United States has a moral obligation to continue our tradition of spreading American ideals and would suffer if that commitment was not met.

“We live in a land made of ideals, not blood and soil,” he said.

“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.”

While not mentioning President Trump by name, McCain’s speech was a sharp contrast to Trump’s habits of shunning international institutions such as NATO and the United Nations.