U.S. Ambassador to China Terry Branstad will step down to work on President Donald Trump's re-election campaign, a U.S. official familiar with the matter said on Monday, departing Beijing at a time when the ties between the world's top two economies are at their worst in decades.

Branstad, previously the longest-serving governor of Iowa, a state in the U.S. Farm Belt which helped Trump get elected in 2016, will leave China in early October, the U.S. embassy said in a statement.

Republican Trump won Iowa by about 9 percentage points in 2016 after his Democratic predecessor Barack Obama had won in the 2008 and 2012 elections.

Trump was expected to win the state easily in 2020 against Democratic candidate Joe Biden, but some opinion polls show the race tightening, attracting money from Democrats in the U.S. Senate and presidential race who now see the state as winnable.

Sources familiar with the matter cite Branstad's popularity in Iowa, having served there as governor for over two decades, as an asset to Trump.

"I suspect the real answer, as usual, is the simplest one: the Trump campaign needs help shoring up Iowa, including making the case to farmers that the President's trade policy has helped them - not an easy sell," said Matthew Goodman, a trade expert at the Center for Strategic and International Studies.

Trump has tested the loyalty of his rural base in Iowa through his trade wars with China and his handling of corn-based ethanol mandates, a core economy for the state.

On Saturday, Trump hinted that Branstad might be joining the campaign. In a video posted on Twitter by Iowa senator Joni Ernst, Trump said Branstad would be coming home from China "because he wants to campaign."

U.S.-CHINA TIES IN DISARRAY

Secretary of State Mike Pompeo in a tweet thanked Branstad for his service since being confirmed in May 2017 and said he contributed to rebalancing U.S.-China relations so that it is "results-oriented, reciprocal, and fair."

U.S-China relations have been increasingly fraught over multiple issues including U.S. objection to China's new security law in Hong Kong to Beijing's handling of the novel coronavirus pandemic and its territorial ambitions in the South China Sea.

Branstad's departure leaves the U.S. mission in Beijing without a confirmed ambassador at such a diplomatically critical time and that gap could last for months even if Trump is re-elected on Nov. 3. The Senate is only scheduled to be in session for about two more weeks before Election Day.

The Chinese foreign ministry has in the past described Branstad, who was instrumental in a so-called Phase One trade deal with China, as an "old friend of the Chinese people". He first forged ties with President Xi Jinping several decades ago when Xi visited Iowa.