The Arizona Republican -- who has recently criticized policies backed by Trump -- told midshipmen that democracies need to recognize the risks these groups pose, saying "it's time to wake up."
McCain said World War II-era American statesmen knew "that tyranny is always a threat to peace" and that "there could be no more isolationism, no more tired resignation -- no more 'America First'" -- a phrase often touted by Trump.
McCain also alluded to the US-Mexico border wall proposed by Trump.
"We have to remind our sons and daughters that we became the most powerful nation on earth by tearing down walls, not building them," he said.
Modern-day politics, McCain suggested, are on a path toward ruining fragile western institutions.
"How did we end up here?" he reflected. "Why do many Americans ignore our moral and historical knowledge and seek escape from the world we've led so successfully?"
The senator said the era for global success of democracy has shifted to "a time in which the seductions of authoritarian rule find favor with many; when self-interested leadership excuses naked aggression with weak rationalizations; when ethnic grievances haunt the old and religious fanaticism fires the minds of the misguided young."
"We have to fight," he added. "We have to fight against propaganda and crackpot conspiracy theories. We have to fight isolationism, protectionism and nativism. We have to defeat those who would worsen our divisions."
Flake hailed McCain's Annapolis speech Tuesday morning.
"Great man, great