After warning that its pavilion at this year's world fair in Dubai was in jeopardy, the United States has found a way to fund it - the UAE government.

The United States said Wednesday that it will be able to participate in Expo 2020, which opens in October as the first world fair in the Middle East or Africa.

"The US pavilion is made possible by the generosity of the Emirati government in recognition of the strong partnership between the United States and the United Arab Emirates," the State Department said in a statement.

It did not explain the contribution, but Secretary of State Mike Pompeo had earlier spoken of $60 million needed to set up the pavilion for the six-month fair.

The United States bars public financing for such international gatherings and President Donald Trump has been a vocal critic of overseas spending when it comes to aid.

But Pompeo had asked Congress to make an exception and foot the bill for the Dubai Expo, fearing that a US no-show would demonstrate weakness at a fair where a rising China will likely showcase its technological prowess in a key region.

But lawmakers were sceptical and encouraged Pompeo to do private fund-raising, leading the State Department to say publicly last month that US participation was in doubt.

The United Arab Emirates, like other Gulf Arab monarchies including Saudi Arabia, has developed close relations with Trump both as a businessman and president.

A website for the Dubai Expo said that the US pavilion would demonstrate three-dimensional printing for prosthetics and organs, a journey to Mars and an idealized future city with minimal traffic.

Expos "are significant opportunities to showcase American freedom, ideals, enterprise, culture and global leadership," the State Department said.

It earlier warned that the lack of legislative funding put at risk bids by Minneapolis and Houston to host upcoming Expos, which can generate thousands of jobs.