European Union foreign policy chief Federica Mogherini talks to the media after meeting U.S. Secretary of State John Kerry (unseen) at the EU Commission headquarters in Brussels, Belgium, June 27, 2016. REUTERS/Francois Lenoir

BEIJING (Reuters) - The European Union is hoping for the smoothest transition and best possible relationship with Britain after it leaves the union, EU foreign policy chief Federica Mogherini said on Wednesday.

Interior minister Theresa May is set to become prime minister on Wednesday, succeeding David Cameron, who announced he was stepping down after Britons unexpectedly voted last month to quit the European Union.

“For sure we’re losing a lot but the UK is losing even more,” Mogherini said during a visit to Beijing. “It’s losing the possibility to sit around the table and contribute to the decision-making of the 28 (countries) altogether.”

Mogherini said she did not believe Brexit would cause more countries to leave the EU but rather could have a deterrent effect.

“What I see in the public opinion reaction all over the world is awareness of the fact that slamming the door is not necessarily going to solve problems. On the contrary, it could make the house fall down,” she said.

She added she hoped institutional turmoil in Britain ends as soon as possible.

At a separate event in Beijing, European Commission President Jean-Claude Juncker said Brexit was impacting both the British and global economy.

“Although we feel that in the short term, Brexit will impact on the British economy and thus will impact the global economy to some extent, we think that in a few years from now there will be no remaining consequences on the global economy,” Juncker said.