The 27 countries left in the European Union after Britain's vote to leave should refrain from taking revenge, but focus on building consensus in areas such as security, migration and economic growth, German officials said on Friday.

German Foreign Minister Frank-Walter Steinmeier told the ZDF television station there was hard work ahead negotiating the terms of Britain's exit, but European leaders were committed to charting a new course that tackled high rates of youth unemployment and other issues raised through the UK referendum.