World leaders have been understanding about leaked revelations that the US spied on them as they know it was not all done under the orders of Barack Obama, the US secretary of state has said.

In an interview with the BBC, John Kerry said foreign governments understood the president did not personally authorise all the surveillance, which included tapping the mobile phone of the German chancellor, Angela Merkel.

Asked about the talks held with foreign leaders over the revelations, Kerry said they had been "very respectful, very understanding. We're all trying to find a way forward that respects privacy, rights, that fights terrorism, that doesn't interfere with people."

Earlier, Kerry acknowledged that the leaders had legitimate questions about the extent of National Security Agency (NSA) phone and internet surveillance revealed in stories by the Guardian and other newspapers based on documents leaked by the whistleblower Edward Snowden.

There has been public outrage about the spying in some European countries, leading them to demand information from the US about the extent of its spying on its allies.

Kerry told the BBC: "The president has ordered a full review into what we're doing. People understand that the president didn't order all these things, this happened over a long period of time, it's been an evolutionary process, we now need to define it more effectively and that's what the president is setting out to do."

Kerry also revealed that talks with Iran at the weekend over its nuclear capabilities had come "very, very close to a deal, extremely close".

"I think we were separated by four or five different formulations of particular concepts, but none so terribly that I don't think it's possible to reach agreement.

"The fact is, we had a unity on Saturday in a proposal put forward in front of the Iranians, but because of the changes, they thought we should go back and change it. What's critical is, it has to be absolutely clear to the world that it isn't a nuclear weapons programme. They have to see there is a standard by which they might be able to do something. We just talked more in 38 hours than the best part of 30 years."