Ed Miliband used a meeting with the US president, Barack Obama, on Monday to discuss the foreign crises engulfing the world and portray himself – to the British electorate as much as his hosts – as a prime minister-in-waiting.

Speaking to British foreign correspondents before his arrival at the White House, the Labour leader was candid about the purpose of his visit. "I am going because I want to be prime minister of Britain in less than ten months and because it is incredibly important – and it is what I think the British people would want – to have a prime minister who works closely with the United States," he said.

The Labour leader repeatedly emphasised his belief in Britain's membership of the EU – a point of friction between the Obama administration and the Conservative-led government. During a more light-hearted exchange, the Labour leader – who studied at Harvard University – told the president he was a baseball enthusiast and Boston Red Sox fan.

A Miliband spokesperson said the meeting with Obama lasted 25 minutes. "The Leader of the Opposition and the President discussed a range of issues, including the situation in Ukraine, Gaza, and the future of the European Union," the spokesperson said. "The pair also discussed the economy, climate change and the approaching referendum in Scotland."

Miliband also used the visit to call on Europe to ramp up its sanctions against Russia over its intervention in eastern Ukraine.

The gesture was likely to have satisfied the Obama administration, which has grown frustrated at the EU's failure to match its own punitive measures against Moscow.

There is widespread belief in Washington that Europe is reluctant to escalate sanctions against Russia because of the collateral economic harm that such a move could cause in European capitals, particularly London and Berlin. Obama said last week that the downing of Malaysia Airlines flight MH17 in eastern Ukraine, a tragedy that claimed 298 lives and has been blamed on Russian-backed rebels in eastern Ukraine, should be a "wake-up call" for Europe.

Echoing those remarks, Miliband said the action taken collectively so far by Europe, which has focused on visa bans and restrictions on individuals close to the Russian president, Vladimir Putin, "has not had the desired effect".

"It is important that European unity is not an excuse for European inaction," he said, adding it was time for Europe to "step up". He added: "If I was in David Cameron's shoes my focus would be on getting common, unified, European action [against Russia]."

The Labour leader called for a meeting of European heads of government to introduce new sanctions targeting companies in Moscow and possibly broader punitive measures targeting sectors of the Russian economy.

The crisis in Ukraine, he said, underscores the importance of Britain remaining in the EU. The British prime minister, David Cameron, has committed to holding a referendum about membership of the EU before the end of 2017. Philip Hammond, the newly appointed foreign secretary, confirmed on Sunday that he would vote for Britain to leave the European Union unless there was significant reform in Brussels.

However, the Obama administration has made it clear it wants Britain to remain in the EU, valuing its influence in the 28-member state.

"There is obviously concern, here, about what Britain's plans are in relation to the European Union," Miliband said. "Whether it is for our own economic prosperity, or solving the strategic challenges that the country faces, from climate change, to terrorism, to the issues that we're talking about today around Russia and Ukraine, our presence in the European Union is essential."

Miliband was in Washington for just a day, ostensibly for a 30-minute meeting with Obama's national security adviser, Susan Rice.

Diplomatic protocol discourages formal bilateral meetings between a US president and another country's opposition politician, but Obama can – and does – occasionally "drop in" on meetings with other White House officials. Although such audiences with the president may appear coincidental, they are in fact the product of considerable lobbying, pre-planning and choreography.

In Miliband's case, strings appear to have been pulled by David Axelrod, a former adviser to Obama who has been hired by the Labour party as an election campaign strategist.

The Labour leader is still remembered in Washington for his firm opposition to air strikes in Syria, which proved significant in shifting the debate over the wisdom of using force against Bashar al-Assad's forces.

Obama himself was notoriously reluctant to engage militarily in Syria, and the failure by Cameron to persuade the UK parliament to authorise military force actually provided the president with further incentive to put the strikes on hold by deferring to the US Congress.

Miliband joins a long line of British opposition leaders – including both David Cameron and Tony Blair – who have visited Washington to meet with presidents prior to general elections. Mostly, the encounters have gone well, although the notable exception was Neil Kinnock's meeting with Ronald Reagan in the runup to the 1987 general election, when the Labour leader was publicly snubbed over his stance on nuclear disarmament.