WASHINGTON -  Barack Obama vowed to speak up if Donald Trump threatens core US values and reassured Americans “we’ll be okay” Wednesday, in a political swansong after eight years as president.

During his final press conference and public appearance before Trump’s inauguration on Friday, the 55-year-old said he was stepping back but would return to the political breach in extremis.

“I want to do some writing, I want to be quiet a little bit and not hear myself talk so darn much. I want to spend precious time with my girls,” he said.

But, he added, any effort to enforce systematic discrimination, erode voting rights, muzzle the press or round up young immigrants, would cause him to speak out.

“There’s a difference between that normal functioning of politics and certain issues or certain moments where I think our core values may be at stake.”

During the campaign Trump vowed to ban Muslims from entering the United States and deport millions of illegal immigrants, many of them Latin Americans long-settled in the country. His strident tone since winning election and the contrast with eight years of Obama’s liberal agenda has given the country something akin to political whiplash.

Trump’s supporters are euphoric that political business as usual may be over, while his detractors are fearful of a mercurial and untested leader.

Against this backdrop, the traditionally mild-mannered ritual of a final presidential press conference was given added political weight.

Obama was in turn resolute and reassuring. “I have offered my best advice,” he said, describing his conversations with the president-elect. “I can tell you that - this is something I have told him - that this is a job of such magnitude that you can’t do it by yourself. You are enormously reliant on a team.”

He also warned Trump to think through foreign policy decisions that may be domestically popular, like his vow to move the US embassy in Israel to Jerusalem.

President Obama made farewell telephone calls to the leaders of India and Afghanistan on the eve of leaving the White House, it was officially announced.

Obama thanked Indian Prime Minister Narendra Modi for his partnership and congratulated him on India’s upcoming 68th Republic Day anniversary, the White House said. Obama traveled to India as Modi’s chief guest at India’s national day parade.

The two leaders also reviewed cooperation on defence, civil nuclear energy, climate change and other issues Wednesday, according to the readout.

The two leaders met at the White House in September 2014. Since then they have met each other eight times,  a record for leaders of US and India.

Obama also spoke with Afghan President Ashraf Ghani, who was joined on the call by the country’s chief executive, Abdullah Abdullah.

Obama expressed appreciation for the partnership between the US and Afghanistan. He encouraged both leaders to continue working to enhance national unity and support a lasting peace and stability.

Twenty-four hours before he takes the oath of office as the 45th US president, Donald Trump arrived in Washington on Thursday, determined to transform American politics over the next four years.

"The journey begins and I will be working and fighting very hard to make it a great journey for the American people," Trump tweeted before leaving Trump Tower, his Manhattan home.

The 70-year-old president-elect traveled aboard an official government jet to a military base near Washington with his wife Melania. The pair exited the plane and headed into the nation's capital for a day of pre-inaugural festivities.

"It is a momentous day before a historic day," said Vice President-elect Mike Pence, as Washington put its finishing touches on the downtown area where hundreds of thousands of Americans will congregate for Trump's inauguration.

Trump will place a wreath at Arlington National Cemetery at 3:30 pm (2030 GMT) before crossing the Potomac River to speak at the Lincoln Memorial, the epicenter of Thursday's events complete with a concert and fireworks.

Trump's swearing-in, on the steps of the Capitol at noon Friday - a date and hour set by the US Constitution - will be carried live on screens around the globe. Rain is forecast.

Tens of thousands of Trump supporters - and anti-Trump protesters - have converged on the capital for the democratic ritual. Numerous dignitaries, including his unsuccessful Democratic rival for the presidency Hillary Clinton, and three former presidents will be in attendance.

Trump is "very anxious to get to the White House and get to work for the American people," said Pence, a 57-year-old Christian conservative who rose from being governor of Indiana to become the second most powerful person in the US government.

Trump, a real estate magnate with no previous political or military experience, was elected in part for his abrasiveness: his working-class supporters have sent him to Washington to turn the page on the Obama era and upend the political status quo.

Trump has vowed to act, and swiftly.

Trump is expected to sign four or five decrees Friday, and then a raft of others beginning Monday to dismantle every policy he can without waiting for congressional approval: immigration, environment, energy and labor regulations are on the list.

He still has to finish writing his inaugural address. In December, at his Mar-a-Lago estate in Florida, he confided that he sought inspiration from John F. Kennedy and Ronald Reagan.

But spokesman Sean Spicer says the words will be Trump's own, and last about 20 minutes, similar to Obama's opening speech.

"It's going to be a very personal and sincere statement about his vision for the country," the incoming White House press secretary said as he hinted at the tone that the Republican billionaire will take.

"I think it's going to be less of an agenda and more of a philosophical document, a vision of where he sees the country, the proper role of government, the role of citizens."

Kennedy devoted his 1961 inaugural address to the state of the world in the midst of the Cold War, famously appealing to his countrymen: "Ask not what your country can do for you, ask what you can do for your country."

Reagan, in 1981, declared: "The government is not the solution to our problem; government is the problem."

Obama, 55, laid down a clear warning to his successor Wednesday. While he did not intend to get involved in day-to-day politics, he said he would not remain silent if certain red lines were crossed.

"I put in that category if I saw systematic discrimination being ratified in some fashion. I put in that category explicit or functional obstacles to people being able to vote, to exercise their franchise," he said.

The Democratic opposition is organizing without Obama.

About a third of US House Democrats will boycott Friday's ceremony. In the Senate, Democrats are putting obstacles in the path of Trump's cabinet nominees, only a handful of whom look to be confirmed Friday.

Republicans had hoped to confirm seven on the new administration's first day.

On Thursday, Trump named former Georgia governor Sonny Perdue to be secretary of agriculture, a move that completes his 15 cabinet selections.

With his inner circle finalized, Trump's incoming cabinet will feature no Hispanics, the first time since Reagan.

Spicer defended Trump against charges he has the largest number of white males in his cabinet in years, describing as "second to none" Trump's diversity in his overall political appointments.

"It's not just about skin color and heritage," Spicer said.

The new administration has asked over 50 individuals to remain in critical posts in order to "ensure the continuity of government," Spicer added, including his predecessor's special envoy to the coalition fighting the Islamic State group, Brett McGurk.