President Donald Trump vouched publicly on Tuesday for Qatar's efforts to stop the funding of terrorism, reversing his past critique and lending presidential credence to Qatari claims that it's been unfairly maligned by its Persian Gulf rivals.

Less than a year ago, Trump stood in the Rose Garden and chided the tiny, gas-rich nation for historically funding terror at a "high level," as he broke with his secretary of state by siding against Qatar in its row with Saudi Arabia, the United Arab Emirates and other neighbors. Since then, Qatar has mounted an aggressive and well-funded campaign to rehabilitate its image in the U.S. and prove it's a reliable American partner.

As Qatar's ruling emir visited the White House on Tuesday, the fruits of that labor began to show.

"You've now become a very big advocate, and we appreciate it," Trump told Sheikh Tamim bin Hamad Al Thani. "A lot of countries were funding terrorism and we're stopping it. It's getting stopped and fast — very important."

He specifically called out Saudi Arabia and the UAE as other countries where terror financing has been a problem in the past.

The emir, seated next to Trump in the Oval Office, was unequivocal in insisting his country maintains a zero-tolerance policy. He repeated the point several times as reporters and cameras were allowed in briefly for the start of their meeting.

"I want to make something very clear, Mr. President," the Qatari emir said. "We do not and we will not tolerate with people who fund terrorism. We've been cooperating with the United States of America to stop funding terrorism around the region."

When the Persian Gulf crisis erupted last summer, Trump was initially sympathetic to concerns voiced by Saudi Arabia, the UAE, Bahrain and Egypt who accused Qatar of spreading extremism, fomenting opposition in the region and cozying up to Iran. Qatar has denied all those charges, and then-Secretary of State Rex Tillerson urged the president to adopt a more neutral stance in the crisis. Trump came out swinging against Qatar anyway, as his administration pursued closer ties with the Saudis and a ramped up its critiques of Iran.

Yet almost a year later, the crisis has remained deadlocked, despite Qatar's efforts to address at least the U.S. concerns, even allowing Treasury Department officials into its central bank. Saudi Arabia and others have continued squeezing the country diplomatically and financially with a partial blockade, arguing those steps were wholly insufficient to address their long list of demands on Qatar, which included shutting down Qatari broadcaster Al-Jazeera.

Over the months, Trump's administration has lost patience with the crisis, especially after an early U.S. effort to mediate a resolution sputtered. Trump hasn't recently repeated the charge about Qatari funding for extremism, and U.S. officials have credited Qatar with making progress in cracking down and improving transparency.

Still, as Trump praised the emir as a "great gentleman" and a "friend of mine," it was unclear how much of the warm reception was due to Trump's time-honored habit of chiding his opponents from afar but then softening when they come face to face.

Nor was it clear what gave the president any reason to be optimistic the Gulf crisis will end any time soon. If there's one thing Qatar and its neighbors currently agree on, it's that there's been essentially zero progress in resolving it, with both sides firmly dug in.

"We're working on unity in that part of the Middle East and I think it's working out very well," Trump said nonetheless. "There are a lot of good things happening."

Trump has spoken recently to the leaders of most of the countries involved in the dispute, and has pushed all five nations to resolve it, the State Department said. As a key example of Qatar's efforts on counter-terrorism, the State Department pointed out that in March, Qatar added roughly two dozen people and entities on its terror blacklist.

There have been other signs that Trump is warming to the Qataris. The day before the emir's visit, the administration told Congress it plans to approve a deal to sell $300 million in "Advanced Precision Kill Weapon Systems" to Qatar, including 5,000 high-explosive warheads and the same number of rocket motors. The U.S. Defense Security Cooperation Agency said that the laser-guided rockets would help Qatar modernize its military and wouldn't alter the basic military balance in the region.

Trump cast Qatar's military purchases as part of an economy-juicing opportunity for the U.S.

"We have a gentleman on my right who buys a lot of equipment from us, a lot of purchases in the United States and a lot of military airplanes, missiles, lots of different things," Trump said.

The meeting came shortly after Trump greeted Saudi Arabia's Crown Prince Mohammed bin Salman with pomp and pageantry at the White House last month at the start of the crown prince's marathon tour of the U.S. The de facto leader of another Qatari opponent, the UAE, will also soon visit the White House.

Qatar has long sought to stress its role as an agreeable U.S. partner in a strategically vital region. The country hosts some 10,000 U.S. troops at al-Udeid Air Base, a key command center for U.S. forces in the Middle East, and has been building new facilities for U.S. troops there at Qatari expense in a bid to make it more comfortable for the Americans.

___

Associated Press writer Ken Thomas contributed to this report.

___

Reach Josh Lederman on Twitter at http://twitter.com/joshledermanAP