Boris Johnson swam around a rocky outcrop several hundred metres off a Biarritz beach.

Facing accusations from political opponents of being out at sea over his Brexit strategy, British Prime Minister Boris Johnson strode into the Atlantic Ocean for a bracing dip on Sunday before tackling trade talks with western allies at a G7 summit.

Johnson plunged into the waters off Biarritz flanked by French soldiers and with Britain's ambassador to France, Ed Llewellyn, in tow, a Johnson aide said.

Better known for his fondness of cycling before entering 10 Downing Street, Johnson swam around a rocky outcrop several hundred metres off a Biarritz beach.

"Let me give you a metaphor," Johnson told ITV. "I swam round that rock this morning. From here you cannot tell there is a gigantic hole in that rock. There is a way through."

"My point to the EU is that there is a way through, but you can't find the way through if you just sit on the beach."

With a deepening political crisis at home, Johnson is making his international debut at a gathering of G7 leaders in the French resort of Biarritz, less than three months before the United Kingdom is due to leave the European Union.

Caught between European and U.S. thinking, Johnson was treading a delicate path, needing to avoid angering a volatile Trump and risking trade ties while not alienating himself from other leaders who have a more multilateral approach to world politics.