Global leaders warned against protectionism this week ahead of Trump's closing address at the World Economic Forum in Davos.

The president promotes the American economy and urges international businesses to invest after what he calls a "resurgence."

In a speech to global political and business leaders, Trump warns against countries trying to "exploit" others through trade agreements.

"Now is the perfect time to bring your business, your jobs and your investments to the United States," Trump told the political and business leaders.

The president cast the United States as a hospitable business environment — boosted in part by the massive corporate tax cut enacted by Republicans and his administration's attempts to slash regulations on businesses. The globe is "witnessing the resurgence of a strong and prosperous America," he said.

At the World Economic Forum in Davos, Switzerland, Trump warned countries against trying to "exploit" other nations through trade, and he reiterated that he would look out for "America first." However, he aimed to reassure the global leaders that "America first does not mean America alone," and said a strong American economy would lift other countries.

President Donald Trump tried to toe the line between anti-trade populism and globalism Friday as he wooed global political and business leaders to funnel more money into the American economy.

President Donald Trump is seen before his speech during the World Economic Forum (WEF) annual meeting in Davos, Switzerland January 26, 2018.

Trump's decision to come to Davos in the first place raised eyebrows. A sitting American president has not attended the annual event since Bill Clinton in 2000. They did so largely to avoid the perception of rubbing elbows with the world's wealthiest wealthy and most powerful individuals.

Throughout the week, Trump and the more than a dozen administration officials who accompanied him to Switzerland cast Trump's trip as one devoted to creating more jobs for Americans. He held bilateral meetings with multiple world leaders, and during a dinner Thursday night he encouraged global business executives to invest in the U.S.

WEF participants were watching Trump's remarks closely. The president has repeatedly bashed multilateral trade agreements and pledged more isolationism than his predecessors, putting him out of place at an event largely devoted to global cooperation.

World leaders including German Chancellor Angela Merkel and French President Emmanuel Macron warned against isolation earlier in the week. Merkel, without mentioning Trump by name, said that "protectionism is not the proper answer."

Trump issued warnings about trade at some points during his speech. "The United States will no longer turn a blind eye to unfair trade practices," he said.

"We cannot have free and open trade if some countries exploit the system at the expense of others."

However, he contended that even his "America first" brand of populism can help people around the globe. When the U.S. economy grows, "so does the world," Trump said.

He said that countries worrying about their citizens first helps them take care of the needs of the "forgotten."

Trump raised eyebrows on Thursday, when he told CNBC that he would rethink the massive Trans-Pacific Partnership trade agreement if the U.S. got a "substantially better deal." Trump pulled out of the deal last year, bashing it as a job-killer for U.S. workers.

It is likely too late for Trump to reconsider joining the deal, which was championed by his predecessor President Barack Obama. This week, the last of the 11 countries that were in the tentative TPP deal agreed to move on without the United States.

Following Trump's remarks, Treasury Secretary Steven Mnuchin told CNBC that Trump prefers bilateral trade deals. But he said he'd "consider" a multilateral agreement if it is the best arrangement for the U.S.