When Peter the Great travelled to France in 1717, Louis XV was only seven years old. On meeting him, the tsar grasped the child king in his arms and lifted him up from the floor to kiss him heartily, shocking onlookers with his disregard of court formalities. An exhibit marking that visit’s tercentenary was the formal occasion for the meeting between Emmanuel Macron, France’s 39-year-old president, and Vladimir Putin, age 64, in the palace of Versailles on Monday. But there was no such enthusiasm at this meeting. This was another test for France’s newcomer to international affairs, who patted Mr Putin on the back – a contrast to his white-knuckle handshake with Donald Trump – but showed he would not be a pushover.

Gay rights, freedom for NGOs and the release of political detainees were raised explicitly in the press conference, echoing messages that Angela Merkel has often pressed upon Russia’s strongman. Behind the scenes, there may have been prior counselling from the German chancellor, Mr Putin’s most experienced and clear-sighted foreign interlocutor; Europe’s cohesion, and the defence of its interests, would be only the better for it.

Mr Macron made plain that firm words could be combined with overtures for dialogue. He told his guest that he sought closer partnership in fighting Islamic State – but also that France was ready to enforce a “red line” in Syria against chemical weapon use, and to increase sanctions against Russia if ceasefire agreements weren’t respected in Ukraine. And, as Mr Putin stood silently, he lashed out at Russia’s “propaganda agents”, the Russia Today and Sputnik news outlets. Mr Macron’s rival Marine Le Pen was ostentatiously welcomed by the Kremlin one month before the first round of the French vote, and analysts suggest it was Russian-affiliated groups who hacked Mr Macron’s campaign (on Monday Mr Putin defended his meeting with Ms Le Pen and brushed aside the hacking claim).

It was just a beginning, but in his meeting with a Russian leader who has made a trademark of catching the west off-guard, Mr Macron revealed himself to be more of a strategist than many expected. He treated diplomacy as a hard bargain, not a case of romanticism about 18th-century history – but at the same time offered Mr Putin a different path, should he one day choose to take it. Overall, he set a welcome tone for European dealings with Russia, especially in the context of an unreliable US administration and multiplying questions about the dealings of Mr Trump’s entourage with Moscow.

As next month’s parliamentary elections approach, the French president is attempting to consolidate his power with a neither-left-nor-right approach reaching beyond old partisan divides. He knows that showing polite toughness with Mr Putin can only help establish his credentials as a statesman. But that the right mix of pressure and inducement was delivered to today’s tsar with a bit of youthful panache should be commended.