Leslie Vinjamuri is an associate fellow with the US and the Americas Programme, serves on the council of Chatham House, and is an adjunct faculty member with the institute's Academy for Leadership in International Affairs. She is also Associate Professor in International Relations at SOAS, University of London The opinions in this article are those of the author.

(CNN) The US presidential election, the nastiest in its history, is finally over .

The next president of the United States, Donald Trump, faces a daunting challenge to restore America's moral authority as a global leader.

That moral authority has been badly damaged over the past 100 days . The fact that many people see this as a problem of Trump's own making means that the task will be even more complicated for him than it perhaps would have been for Hillary Clinton.

As president, Trump will quickly find his hands tied if he does not seek to reverse this downward spiral.

The tenor of the debate in the US has cast a shadow over the country, and that shadow is visible far beyond America's shores. This shadow is one marked by uncertainty and fear about the implications of a Trump presidency, especially in Europe and Asia.

But American values are reflected first and foremost through the lens of its domestic politics. Trump's embrace of torture tactics , his racist language and his sexism create mistrust among America's liberal allies and fear among allies that do not share a common culture with the United States.

JUST WATCHED Carl Bernstein: Trump win is 'tragic and dangerous' Replay More Videos ... MUST WATCH Carl Bernstein: Trump win is 'tragic and dangerous' 00:45

Trump also must reunite an American public that is deeply divided. If Trump fails to overcome these divisions, they are likely to take root and fester, with grave consequences for the future health of America and for the rest of the world.

The last 100 days have seen a campaign dominated by mudslinging, racism, sexist attacks, false allegations, attacks on individual characters and a willingness to "go low." The willingness of Trump to abandon a basic sense of decency, decorum and dignity in public debate has undermined international confidence in the US.

In a world where power is more evenly distributed among a number of states -- and many leading powers do not embrace similar values to those of the US -- leadership that has the potential to unify will matter more, not less.

Candidates may not need allies, but presidents do. Moral authority and the liberal values that underpin it have always been an essential component of American leadership. And America's leadership has depended on the goodwill of its allies. The defection from liberal values, reflected in concrete policy proposals, makes this difficult.

Foreign publics have recoiled as a candidate for president has threatened to withdraw support from key allies in Europe and Asia, to rethink its support for NATO, and cozied up to Vladimir Putin

When both candidates embraced political platforms that were anti-free trade -- at a time when populism threatens the fabric of social life in many countries -- America's ambivalence will have generated fear among its partners.

In Asia, many nations have hung their hat on the hope that the US would deliver the Trans-Pacific Partnership . This now looks increasingly unlikely.

For European leaders -- whose post-war recoveries were built on the back of the Marshall Plan and who now face their own crises driven by problems in the euro zone, immigration, and the politics of Brexit -- the absence of American economic leadership leaves a gaping hole.

JUST WATCHED Wolf, Tapper react to Trump's historic win Replay More Videos ... MUST WATCH Wolf, Tapper react to Trump's historic win 01:18

At a time when Europe is politically turning in on itself, tensions with Russia are high, and the US-China relationship calls for careful management, the leadership vacuum is palpable.

In the twilight of Obama's presidency we have witnessed a resurgent Russia that has violated human rights norms at home and sovereignty norms abroad. It continues to intimidate Baltic and Eastern Europe states. These countries are waiting to see if America will come to their defense. In Syria, Russia's active backing of Assad's attacks on innocent civilians is an even greater barrier to US-Russia relations and one that will be difficult for Mr. Trump to shy away from.

In Asia, we are seeing China assume a more confident role in dealing with previous US allies. Filipino President Rodrigo Duterte said on a recent visit to China: "America has lost now. I've realigned myself in your ideological flow."

Follow CNN Opinion Join us on Twitter and Facebook

Nowhere has America's role as a liberal leader been more symbolic than in its embrace of immigrants. That the Statue of Liberty and Ellis Island continue to be two of the America's top tourist destinations stands in stark contrast to the attacks on immigration that have dominated recent electoral politics.

The 45th president of the United States will face a daunting, Janus-faced challenge -- to restore at home and lead abroad.

American leadership has always been marked by hypocrisy, but Trump's public disavowal of the American commitment to the most basic liberal principles has threatened to undermine even the aspirations that the world has come to accept as fundamental to the liberal order.