News of the migrant rescue mission on board HMS Bulwark reached David Cameron as he left the UK for the G7 leaders' summit in Germany.
As the formal meeting got underway high up in the Bavarian Alps, the rescue mission - and Britain's commitment to maintain its defence budget - was shaping the discussions.
Mr Cameron also committed to send more than 100 additional troops to Iraq - a mission on which he plans to brief President Obama during their talks this evening.
Britain would not 'walk on by' Mr Cameron insisted as he spoke about the migrant crisis which led to the Royal Navy flagship picking up more than 1000 people from the seas off Libya.
Nearly 400 were crowded into just one of the wooden boats.
The Prime Minister said Britain was playing its part in the humanitarian mission to rescue people from the sea but it was also working to establish a better government in Libya so that the numbers trying to leave for Europe could be cut.
The extent of the crisis was outlined by the Commanding Officer of HMS Bulwark, who suggested as many as half a million migrants were waiting for boats on the Libyan coast.
The leaders of Germany, Italy and France - whose countries are among the desired destinations - will also take part in the talks on the migrants.
On Iraq, the Prime Minister will tell the US President of his plans to nearly double the number of British soldiers in the country.
Mr Cameron says it's in response to a direct plea from Iraqi Prime Minister Adabi - who will also attend the G7 summit - to counter the threat from Islamic State.
Most of the additional troops will be providing specialist training to the Iraqi Army on counter-IEDs - roadside bombs.
It brings to 900, the total number of British personnel in the training and air operation against IS in Iraq and Syria.
But Mr Cameron will also have to justify his most recent cuts to the defence budget announced last week - of an additional £500 million.
In recent weeks, some in the US administration have been critical of the UK's long term commitment to maintain defence spending at the NATO target of 2% of GDP.
Britain is hitting that target this year - but the Prime Minister will not commit Britain to the 2% target before the Conservative spending review in the Autumn.