A spokesman for the US State Department was caught on camera attempting not to laugh as he heard the news Boris Johnson had been made the UK's foreign secretary.

Mark Toner broke into a bemused grin when he was told Johnson's new position during a briefing, then managed to compose himself, but not before his feelings on the Leave campaigner's new job were made clear.

Johnson previously disagreed with US President Barack Obama over the Brexit campaign, but Toner said the US would always attempt to work with UK politicians and the foreign secretary – although he could not resist adding "no matter who is occupying the role".

Johnson was also accused of racism after he referred to Obama as "part Kenyan" in a row over the president removing the bust of Winston Churchill from the Oval Office.

Toner also smiled as he was asked how he thought Johnson's appointment would affect the relationship between the US and UK, and how the diplomatic relationship would work.

"We congratulation Foreign Secretary Hammond on his new role and we look forward to engaging with Boris Johnson as the new foreign secretary," Toner said.

"This is something, frankly, a relationship that goes beyond personalities and it is an absolutely critical moment in, certainly England's history, but also in the US/UK relationship, so absolutely we are committed to working productively going forward."

Asked about Johnson's Leave movement, Toner said: "The British people voted and they voted to leave the European Union, and now our focus is on the future."

Toner's surprise at Johnson's appointment was shared by UK politician Angela Eagle, who recently launched her bid for the Labour Party leadership. She was caught on film by the Press Association reacting to the appointment, while German chancellor Angela Merkel declined to comment on the new foreign secretary.