President Barack Obama on Wednesday sought to debunk criticism that America has acted hypocritically in condemning Russia’s actions in Ukraine, dismissing any comparison to the U.S.-led invasion of Iraq in 2003.

“Even in Iraq, America sought to work within the international system,” said the commander-in-chief in a major foreign policy speech at the Palais des Beaux-Arts in Brussels. “We did not claim or annex Iraq’s territory. We did not grab its resources for our own gain.”

Obama noted that he opposed America’s military intervention in Iraq. But he added the U.S. eventually “ended our war and left Iraq to its people in a fully sovereign Iraqi state that can make decisions about its own future.”

The president also argued that the comparison between Crimea and Kosovo makes no sense. “Russian leaders have further claimed Kosovo as a precedent, an example, they say of the West interfering in the affairs of a smaller country … But NATO only intervened after the people of Kosovo were systematically brutalized and killed for years.”

“And Kosovo only left Serbia after a referendum was organized not outside the boundaries of international law, but in careful cooperation with the United Nations with Kosovo’s neighbors,” Obama added. “None of that even came close to happening in Crimea.”

His remarks were part of a broader foreign policy speech in which he argued that the U.S. and Europe are facing a “moment of testing” and that Russia’s military advancements threaten the international system that was born from generations of warfare and the desire for freedom and human dignity.

“Russia’s leadership is challenging truths that only a few weeks ago seemed self-evident: that in the 21st century, the borders of Europe cannot be redrawn with force, that international law matters, and that people and nations can make their own decisions about their future,” said Obama.

His speech comes after G7 leaders agreed on Monday to expel Russia from the G8 group of industrialized nations in a move designed to punish Putin and prevent any further military incursions into Ukraine. The countries have also imposed sanctions on aides and allies of Putin and cancelled a G8 summit in Sochi, Russia, which was planned for the summer.

Obama also sought to present a united front in opposition to Moscow at a news conference earlier in the day, calling the sanctions “the most significant Russia’s faced since the end of the Cold War,” and warning there would be “growing consequences” if Russia chooses not to ameliorate the situation through diplomacy.

“Russia stands alone,” he said.

The president acknowledged that further sanctions would impact European countries that rely heavily on Russia. Obama said the crisis has highlighted just how important it is for Europe to “further diversify its energy sources.”

The president, during his big speech, argued that if the U.S. applied its interests narrowly it “might decide to look the other way,” as the U.S. faces no direct threat from the invasion of Crimea.

But that kind of “casual indifference,” said Obama “would ignore the lessons that are written in the cemeteries of this continent. It would allow the old way of doing things to regain a foothold in this young century.”

Meanwhile, Russian Foreign Minister Sergei Lavrov has shrugged off his country’s permanent expulsion from the G8. He told reporters at a global nuclear security summit in The Hague earlier this week that it was a membership Moscow was “not clinging to” and described it as an informal group. Putin has pointed to a recent, controversial referendum, in which Crimea voted overwhelmingly to join Russia and secede from Ukraine. The White House has contended the vote is contrary to Ukraine’s constitution and was administered under threats of intimidation and violence.

Obama said instead of meeting in Sochi, the G7 will meet in Brussels in June without Russia.

The president is scheduled to meet with Pope Francis in Rome on Thursday before heading to Saudi Arabia on Friday to meet with King Abdullah.