Donald Trump has welcomed Qatar's leader to the White House, barely a year after denouncing the gas-rich Gulf state as a "funder of terror".

The US president initially sided with Saudi Arabia and other Arab nations when they cut ties with their neighbour over its alleged support for jihadists.

But on Tuesday he praised Sheikh Tamim Al Thani for becoming a "big advocate" of combating terrorist financing.

He also said the emir was a "great gentleman" and a "friend of mine".

Sheikh Tamim said the Qatari authorities did not and would not tolerate "people who fund terrorism" and that Mr Trump had been "very helpful" in supporting Qatar during the partial blockade that is still in place.

The dispute began last June, when Saudi Arabia, the United Arab Emirates, Egypt and Bahrain severed all diplomatic and trade links with Qatar.

Yemen, the Maldives and Libya's eastern-based government later followed suit.

Qatar's only land border was closed; ships flying the Qatari flag or those serving Qatar were banned from docking at many ports; and much of the region's airspace was closed to Qatari aircraft.

The Saudi-led bloc accused Qatar of supporting terrorist groups across the region and of being too close to Iran, with whom it shares a huge offshore gas field.

Qatar acknowledged providing assistance to Islamist groups designated as terrorist organisations by some of its neighbours, notably the Muslim Brotherhood. But it denied aiding jihadist groups linked to al-Qaeda or Islamic State (IS).

In return for ending the partial blockade, Qatar's neighbours demanded that it shut down the Al Jazeera news network, close a Turkish military base, cut ties with the Muslim Brotherhood, and downgrade relations with Iran.

Qatar rejected the demands, saying it would not agree to any measures that threatened its sovereignty. It quickly established new trade routes to ensure the basic needs of its population of 2.7 million were met and spent tens of billions of dollars to prop up its economy.

Despite Qatar hosting the largest US military facility in the Middle East, President Trump was quick to claim credit for the partial blockade.

But aides subsequently persuaded him to take a more neutral stance. Qatar also mounted an expensive lobbying campaign in Washington.

In a remarkable turnaround on Tuesday, Mr Trump hosted Sheikh Tamim at the Oval Office and praised Qatar's efforts to address US concerns.

"We're making sure that terrorism funding is stopped in the countries that we are really related to," he said.

"But those countries are stopping the funding of terrorism, and that includes UAE and it includes Saudi Arabia, it includes Qatar and others. A lot of countries were funding terrorism and we're stopping it."

Mr Trump turned to the emir and added: "You've now become a very big advocate, and we appreciate that."

The president also noted that Qatar "buys a lot of equipment from us, a lot of purchases in the United States and a lot of military airplanes, missiles".