WASHINGTON (Reuters) - The longest-serving U.S. diplomat warned against isolationism, protectionism and Russian aggression on Friday in a retirement speech implicitly criticizing some of U.S. President Donald Trump’s policies even as he urged officials to serve the White House loyally.

FILE PHOTO - U.S. State Department's Coordinator for Sanctions Policy Ambassador Daniel Fried sits for the high-level sanctions meeting with South Korea's Special Representative for Korean Peninsula Peace and Security Affairs Kim Hong-kyun (not pictured) at the Foreign Ministry in Seoul, South Korea on March 21, 2016. REUTERS/Lee Jin-man/Pool/File Photo

Ambassador Dan Fried argued that since becoming a world power over a century ago, the United States had largely pursued an open, rules-based world, rejected “spheres of influence” where great powers bully their neighbors and contributed to “the longest period of general peace in the West since Roman times.”

“This track record suggests that an open, rules-based world, with a united West at its core, is an asset and great achievement, and a foundation for more,” the former assistant secretary of state for European and Eurasian affairs said as he wrapped up a nearly 40-year career at the U.S. State Department.

“Yet, some argue that this is actually a liability, that values are a luxury, that in a Hobbesian or Darwinian world we should simply take our share, the largest possible,” he added.

The comment was an implicit rebuke to the “America First” approach in which Trump has pledged to end what he sees as decades of other nations freeloading on U.S. security and exploiting trade agreements harmful to U.S. workers.

In his speech, Fried noted “how improbable victory in the Cold War appeared” in the 1980s and he hailed the freeing of swathes of Europe, including Poland, where he served as U.S. ambassador, from Soviet domination.

“This great achievement is now under assault by Russia,” he said. “It is for the present generation to defend and, when the time comes again, extend freedom in Europe.”

While Fried is a skeptic of Russian intentions, colleagues described him as a pragmatist who led efforts to work with Russia as a White House aide under Bill Clinton after the fall of the Berlin Wall and later when serving George W. Bush.

He is the latest member of a generation of experienced hands who have left U.S. diplomatic ranks in recent months. Some, like Fried, have retired voluntarily, while others Trump chose not to retain.

Many current and former U.S. officials are troubled by Trump’s openness to closer ties with Russia, fearing this could lead to acquiescence in its annexation of Crimea from Ukraine and, more broadly, in Russian domination of its other neighbors.

Free trade advocates are also worried by Trump’s decision to abandon the 12-nation Trans Pacific Partnership trade deal, his desire to renegotiate the North American Free Trade Agreement and his suggestion he could impose punitive tariffs.

Fried argued against a winner-take-all attitude in which the great powers each try to carve up the world to their advantage.

“Spheres of influence ... would mean our acquiescence when great powers – starting with Russia and China – dominated their neighbors through force and fear, while creating closed economic empires,” he said. “America would essentially retreat from whole areas of East Asia, Central Asia, and Eastern Europe.”

In what appeared another implicit criticism of the current administration, whose efforts to clamp down on immigration from seven Muslim-majority nations and on refugee admissions have been stymied by the courts, Fried said: “We are not an ethno-state, with identity rooted in shared blood.”

The retiring diplomat also urged current officials to serve Trump and new Secretary of State Rex Tillerson “with loyalty, dedication and courage.”

“Help Secretary Tillerson. He deserves it. And he needs it. And help the president as well, putting your backs into it.”

Among those who spoke at the event were former Deputy Secretary of State Tony Blinken, who took a dig at how long it has taken Trump to fill State Department jobs, including his own.

“When Secretary (of State John) Kerry used to say to me as deputy, ‘you are truly irreplaceable,’ I thought it was just flattery,” Blinken said. “Who knew?” he added, to loud laughter.