(CNN) British Foreign Secretary Boris Johnson told European leaders Friday to stop whining about the US election results following a slew of anxious statements in response to Donald Trump's shocking victory.

"I would respectfully say to my beloved European friends and colleagues that it's time that we snapped out of the general doom and gloom about the result of this election, and collective 'whinge-o-rama' that seems to be going on in some places," Johnson said at a press conference in Belgrade, Serbia, using British slang for complaining.

The comments from the colorful British politician -- who was widely tipped to become prime minister after successfully spearheading the campaign to leave the European Union -- may have surprised some since he had earlier been outspoken about his disdain for the President-elect

Johnson once said he was "genuinely worried that (Trump) could become president."

And after Trump claimed areas of London were dangerous due to radicalized Muslims, Johnson said: "The only reason I wouldn't visit some parts of New York is the real risk of meeting Donald Trump."

But he appears to have found a silver lining in Trump's win, saying the election was a "great opportunity for the UK" following Britain's seismic vote in June to leave the EU.

Photos: World reacts to Trump victory Slovenians toast Donald Trump's victory in Sevnica, the hometown of Trump's wife, Melania, during a broadcast of his acceptance speech on Wednesday, November 9. Trump defeated Democratic presidential nominee Hillary Clinton and will become the 45th president of the United States. Hide Caption 1 of 19 Photos: World reacts to Trump victory The U.S. dollar exchange rate is seen on the board of a bank in Mexico City on November 9. The dollar tumbled against the yen and euro while the Mexican peso fell off a cliff as polling results pointed to a strong showing by Trump. Hide Caption 2 of 19 Photos: World reacts to Trump victory Taxi driver Uljan Kolgjegja holds a flare as he celebrates Trump's victory in Tirana, Albania, on November 9. Hide Caption 3 of 19 Photos: World reacts to Trump victory Bethany Hindmarsh, an environmental activist attending the COP22 Climate Conference in Marrakesh, Morocco, reacts during a protest against Trump on November 9. News of Trump's win has alarmed environmentalists and climate scientists concerned that a Trump presidency could mean the United States pulls out of an international climate deal. Hide Caption 4 of 19 Photos: World reacts to Trump victory Vladimir Zhirinovsky, leader of the Liberal Democratic Party of Russia, left, toasts in front of a TV screening Trump's acceptance speech on November 9. Hide Caption 5 of 19 Photos: World reacts to Trump victory A stock trader at ETX Capital in London gestures to a screen showing the S&P 500 Index on November 9. Global stock markets dropped as Trump's victory became more likely on Election Day. Hide Caption 6 of 19 Photos: World reacts to Trump victory An expatriate Democratic supporter weeps in a restaurant in Phnom Penh, Cambodia, as the election is called in Trump's favor on November 9. Hide Caption 7 of 19 Photos: World reacts to Trump victory Iraqi troops view Trump's acceptance speech in a house in Arbid, on the outskirts of Mosul, Iraq, on November 9. Iraqi Prime Minister Haider al-Abadi congratulated Trump on his win and said he hoped for continued support in the war on ISIS. Hide Caption 8 of 19 Photos: World reacts to Trump victory People react to Trump's victory at the US Embassy in Brussels, Belgium, on November 9. Hide Caption 9 of 19 Photos: World reacts to Trump victory Clinton supporters watch the incoming results at a cafe in Beijing on November 9. Hide Caption 10 of 19 Photos: World reacts to Trump victory A man reads a newspaper proclaiming Trump's victory in Guatemala City, Guatemala, on November 9. Hide Caption 11 of 19 Photos: World reacts to Trump victory People attending an election event in The Hague, Netherlands, react as Trump is declared the winner on November 9. Hide Caption 12 of 19 Photos: World reacts to Trump victory Debris burns in the street during a protest that took place in Oakland, California, after news of Trump's victory. Hide Caption 13 of 19 Photos: World reacts to Trump victory A stock ticker at the Athens Stock Exchange scrolls above a TV screen showing Trump on November 9. Hide Caption 14 of 19 Photos: World reacts to Trump victory People celebrate Trump's win during a victory party at the New York Hilton Midtown Hotel. Hide Caption 15 of 19 Photos: World reacts to Trump victory Two men in Gaza watch coverage of the election on November 9. Hide Caption 16 of 19 Photos: World reacts to Trump victory A trader from ETX Capital reacts in London following the election result. Hide Caption 17 of 19 Photos: World reacts to Trump victory Trump and Clinton supporters clash in New York's Times Square after Trump's victory was declared on November 9. Hide Caption 18 of 19 Photos: World reacts to Trump victory Protesters from Avaaz, a global civic movement, display a sign protesting bigotry outside the White House on Tuesday, November 8. Hide Caption 19 of 19

European leaders speak with Trump

Johnson's optimism contrasts with the lukewarm response from many EU politicians to Trump -- a candidate who lobbed insults at Europe and European leaders during his campaign, and was heavily criticized in turn.

Now they are having to put aside their differences with the President-elect and are pledging to work with him.

German Chancellor Angela Merkel, whom Trump slammed during the campaign for "ruining Germany" by accepting large numbers of refugees, spoke on the phone Thursday with the President-elect, a German government representative told CNN.

Merkel congratulated Trump and pointed out the two countries have long-held common values, making them close.

Earlier, she had responded to Trump's win by saying the campaign had been notable for its confrontations, which had been hard to take.

On Friday, French President François Hollande -- who has said that Trump's comments on a dead soldier made him want to retch -- had a "cordial" eight-minute phone conversation with the US President-elect during which they agreed to work to clarify positions on key issues, Elysée spokeswoman Elise Beretz told CNN.

Those issues included the fight against terrorism, Ukraine, Syria, Iraq and the Paris Agreement on climate change, she said.

They also "remembered the history and values that the two countries have in common, the amicable relations between France and the United States," Beretz said.

Hollande had earlier congratulated Trump on his win but said the result "leads to uncertainty," adding that he urged "vigilance because of statements made by Donald Trump."

EU chief sees 'new challenges'

British Prime Minister Theresa May also spoke to Trump on the phone Thursday in a call that ended with the President-elect inviting her to visit as soon as possible.

May had earlier been diplomatic in her congratulations, saying the two nations shared a "special relationship based on the values of freedom, democracy and enterprise."

JUST WATCHED Voters explain fears about a Trump presidency Replay More Videos ... MUST WATCH Voters explain fears about a Trump presidency 02:07

"We are, and will remain, strong and close partners on trade, security and defense," she said.

European Council President Donald Tusk responded to Trump's win by saying he respected the democratic choice of the American people, but was "aware of the new challenges that these results bring."

One of those challenges, he said, was "this moment of uncertainty over the future of our trans-Atlantic relations."

"The events of the last months and days should be treated as a warning sign for all who believe in liberal democracy," Tusk said.

"This means that we should finally get our act together and bring back a sense of direction, bring back confidence, bring back a sense of order."

European right celebrates

But while the political establishment in Europe has reacted uneasily to Trump's win, parties on the right have rejoiced, likening it to the same mood of populist discontent they believe is redefining the political landscape on the continent.

Nigel Farage, the outgoing leader of the UK Independence Party and one of Brexit's top campaigners, told CNN that he and Trump had both triumphed in "the big battle of 2016." Farage, who spoke at a Trump rally in August, once called Trump "the new Ronald Reagan."

"I believe in nation-state democracy, I believe in controlling borders, I believe we've got to confront the threat of Islamic terrorism, and President-elect Trump believes in very much the same thing," he said from Miami.

But Farage said he considered it unlikely the British government would offer him a position as a mediator with Trump despite British press speculation about such a role.

Britain's ruling Conservative Party was "incredibly snobby about me, they find it very difficult to even have a conversation with me," he said.

Florian Philippot, a National Front vice president, tweeted a photo of Le Pen with the caption: "Their world is collapsing. Ours is being built."