LONDON -- British Prime Minister Theresa May has taken the unusual step of distancing her government from President Barack Obama’s criticism of Israel.

A spokesman for May said the British government does not think it is “appropriate to attack the composition of the democratically elected government of an ally.”

The comments made Thursday were in response to U.S. Secretary of State John’s Kerry’s outspoken speech challenging the Israeli government’s policy on settlement expansion and other issues.

Get Breaking News Delivered to Your Inbox

May’s spokesman, speaking anonymously in line with government rules, said it was wrong to focus solely on the settlement issue when the Palestinian-Israeli conflict is so complex.

The comments bring Britain’s government more closely into line with the view of President-elect Donald Trump, who has said the Obama administration is being far too harsh toward Israel.