His days as president of the United States may be numbered, but Donald Trump is going out of his way to light a string of wildfires for his successor to put out.
While President-elect Joe Biden's immediate focus will likely be on the troubled domestic situation, with the Covid-19 pandemic and the political divide in the US, the Trump administration has also opted, as part of its final act, to hand him a series of new international diplomatic dilemmas. In some instances, these are life-or-death situations.
In recent days, the Trump administration has named Cuba a state sponsor of terrorism, said it will designate Yemen's Houthi rebels as a foreign terrorist organization, and upended decades of US-China diplomacy by lifting restrictions on contacts between American officials and representatives from the self-governing island of Taiwan.
These moves, announced by Secretary of State Mike Pompeo, mean Biden will start his presidential term with several key foreign relationships mired in controversy, thanks to the policies set by his predecessor.
"The Trump administration is locking in place a series of conflicts that change the starting point for Biden walking into office on the world stage," said Raffaello Pantucci, a senior fellow at Singapore's S. Rajaratnam School of International Studies.
Potentially the most difficult of the three, on a diplomatic level, comes from the change in relations with Taiwan.
The US has walked a tightrope on this issue, maintaining a close relationship with Taiwan ever since it split from China in 1949 after the end of a bloody civil war, even going so far as providing weapons to the island.
However, since Washington established formal diplomatic ties with Beijing in 1979, it has resisted having official diplomatic relations with Taipei in order to avoid a confrontation with the Communist leadership on the mainland, which still sees the island -- home to around 24 million people -- as part of China.
Chinese President Xi Jinping has said that he wants to "reunite" Taiwan with the mainland, by force if necessary.
Critics fear this week's move by the Trump administration will hand Beijing leverage over the incoming Biden administration, even though strengthened US support for Taiwan against an increasingly assertive China has largely been a bipartisan consensus in Washington.
"If the US decides it wants to work with China on climate change, for example, China can demand that the US reverses its position on Taiwan," said Pantucci.
And whether China hawks in the US like it or not, Biden might well have to work with China to tackle climate change, global terrorism and all sorts of other issues.
Analysts had long expected Biden to retain a hawkish position on China, but they believed he would work with international allies to build a coherent coalition, rather than maintaining Trump's maximum pressure approach.
"What Biden should do is work with European allies to have an aligned strategy towards China, but in order to do that you need some time to build that," said Leslie Vinjamuri, director of the US and the Americas program at Chatham House. "You don't need more immediate issues getting in the way."
Getting partners -- especially those in Europe -- to share a unified position on China was already a difficult task.
"European nations have very different attitudes to China, with some -- like the UK -- very concerned and others -- like Italy and Germany -- more focused on China as an export market," says Tom Tugendhat, chairman of the UK's Foreign Affairs Select Committee.
While it's tempting to suggest Biden could simply reverse the policy once he takes office, that ignores the lose-lose situation in which Trump has left the President-elect.
As Pantucci points out, capitulation would "cost Biden political capital at home," where anti-China sentiment is pretty strong across the political aisle. If Biden reimposes restrictions on contacts with Taiwan, it would also allow Beijing to claim that the US had accepted its status as a province of China.
This "could have major implications in Taiwan's democracy itself, as Xi and his allies have not been hesitant to assert their authority when given the space to do so," Pantucci added. While China is "very unlikely to attack Taipei," Pantucci warned there could be "more meddling [by Beijing] in politics, meddling economically" if Trump's policy remains in place.
Bullying the Houthis is 'a fantasy'
The situation in Yemen is equally fraught and, as a result of the Trump administration's actions, potentially more deadly.
The war in Yemen has dragged on since 2014. Diplomatic paths to ending the conflict between the Saudi-backed government and Iran-backed Houthi rebels have thus far failed.
It has been described by UNICEF as the "largest humanitarian crisis in the world, with more than 24 million people -- some 80 percent of the population -- in need of humanitarian assistance, including more than 12 million children."
"The designation of the Houthis as a terrorist organization will not help this conflict be resolved in any sense, and actually risks prolonging it," said Chris Doyle, director of the Council for Arab-British Understanding.
"There are risks that the Houthi hardliners will feel empowered to turn towards Iran more. They will be unwilling to engage in diplomatic processes or backchannels to Saudi Arabia."
The longer the crisis goes on, the worse things will get for those in need of humanitarian assistance, analysts said.
The terrorism designation will only make it harder for aid groups to deliver food and medical supplies to the country. It will also "make it hard for aid organizations to have staff on the ground, as the Houthis can control the two main entry points to Yemen," Doyle said.
"By picking one side in a conflict, you can really harm the civilian populations and it's very irresponsible," Doyle added. "The idea that you can bully the Houthis into softening their stance is a fantasy."
Nail in the coffin for Obama's Cuba policy
Pompeo's redesignation of Cuba as a sponsor of state terror will probably have the least material impact, but it represents a personal loss to Biden and a significant political win for Trumpism.
In doing so, Trump is hammering the final nail in the coffin of Barack Obama's efforts to normalize relations with Cuba.
Stories have and will continue to be written about how Trump's hard line on Cuba's Communist leaders played well with the Latino vote in Florida. This final act could well leave a legacy for whoever carries the Trump torch in 2024.
"If the US now goes to Cuba and says they want to reset back to where things were at the end of the Obama administration, Cuba can legitimately ask why it should bother when it's possible that someone like Trump could be elected again in 2024," said Pantucci.
And a reset, while not top of his list of priorities, might have been something Biden would consider, given he was Obama's vice president.
The legacy issue is something Vinjamuri to which is paying particularly close attention to.
"These really are the dying days of the Trump administration and they really seem to be laying the groundwork for something they can build on," she said, suggesting that Pompeo's final moves could be an attempt to burnish his hardline credentials for a run at the 2024 presidential election.
Biden will be sworn into office on January 20. Trump will be gone -- at least for now -- but his impact on the world will be felt for years to come.
And it could take an entire term for the new administration to untangle the eleventh-hour decisions made by its predecessor.