Donald Trump said on the campaign that he wants a "smooth, beautiful transition" after Election Day, but he offered an ambiguous follow-up caveat: "But it's got to be an honest vote."

For months, the US president -- who on Tuesday will battle Joe Biden at the polls to win another four years in the White House -- has planted seeds of doubt about the legitimacy of the election.

The Republican incumbent has questioned the validity of mail-in ballots, demurred on whether he will accept the results if he loses to the veteran Democrat, and been vague about what a transition to his rival would look like.

The transition between election and inauguration is a quirk of American politics: the more than two-month gap is particularly long.

After a campaign marked by its unrelenting nastiness, and amid a health crisis of a magnitude never before seen in modern times, what would a transition from Trump to Biden look like?

During a presidential transition, the team entering the White House -- though they still don't have the keys -- prepares to take power alongside the outgoing administration.

In the words of Martin Anderson, author of "Revolution: The Reagan Legacy," it's a time of "delicious chaos."

The Center for Presidential Transition has prepared a how-to guide for government agencies that summarizes the enormity of the task at hand:

-- Staffing the White House and the Executive Office of the President

-- Making more than 4,000 presidential appointments, about 1,200 of which require Senate confirmation

-- Learning the ins and out of more than 100 federal agencies

-- Preparing the first 100 days of the new administration

Biden has put in place a transition team that, following tradition, is raising funds to be able to get up and running.

According to Politico, it hopes to have at least $7 million in hand by Election Day, and a staff of at least 350 people by Inauguration Day in January 2021.

It's hard to say what the 45th president of the United States will do if he loses to Biden.

The question has forced observers to look back at what the 74-year-old Trump has said in recent months -- and whether to take him at his word or assume some of those comments were for shock value.

If Donald Trump loses to Joe Biden on Election Day, what will the White House transition from the Republican president to his Democratic rival look like?
If Donald Trump loses to Joe Biden on Election Day, what will the White House transition from the Republican president to his Democratic rival look like? AFP / Brendan Smialowski

For veteran political analyst Larry Sabato at the University of Virginia, that "depends heavily on the margin of Biden's victory (assuming he wins)."

"If Trump loses by a wide margin, he will grumpily do the minimum to pass the torch to Biden," Sabato told AFP.

If the result is close, all bets are off and anything -- even violent protest -- is possible, the expert added.

If the last four years are any indication, some observers say, there is cause for concern.

A coalition of 12 non-governmental organizations wrote to the National Archives to express their fears.

"We are alarmed and deeply concerned by the Trump administration's failure to honor its legal responsibility to create and preserve records," they said in a letter.

It remains an open question what Trump would do in the final 77 days of his administration if he loses. History is full of examples of controversial presidential pardons during the so-called "lame duck" period.

US law stipulates that the incoming president should have wide access to whatever is needed during the transition, but of course, some of that depends on the goodwill of the ousted administration, especially the president.

Sometimes, the heat of the campaign is hard to forget.

One anecdote remains the stuff of Washington lore: during the transition from Bill Clinton to George W. Bush in late 2000 and early 2001, the letter "W" was damaged or removed from numerous White House computer keyboards...

When Bush ceded the Oval Office to Barack Obama in 2009, the transition was smooth and gracious, despite the vastly different politics of the two men. Of course, that is easier when the president leaving had two terms in office.

"When a president is doing transition planning at the end of eight years in the presidency, it is easier to begin the planning well ahead of time," said Martha Kumar, a presidential scholar and head of the White House Transition Project.

"Additionally, it becomes part of the departing president's legacy so he has a stake in doing a good job."

Among recent one-term presidents, George H.W. Bush stands out for his poise in handing over to Clinton. His letter to the Democrat who defeated him is often cited as one of the most elegant and gracious.

"Dear Bill... I wish you great happiness here. I never felt the loneliness some Presidents have described," Bush wrote.

"I'm not a very good one to give advice; but just don't let the critics discourage you or push you off course," he said.

"Your success now is our country's success. I am rooting hard for you. Good luck."

If Trump loses, will he leave a letter for Biden? And what will it say?