Donald Trump did not take action against Israel after it was accused of planting spying devices found near the White House in a move that has shocked former intelligence officials, according to a new report.

The devices are called “stingrays” and can extract identifying information from mobile phones, including their geolocation. They were found near the White House and across Washington in “sensitive locations”, former officials told Politico, adding that the US government determined Israel was “most likely” behind their placement.

Officials said the devices were probably planted in order to spy on Mr Trump and his inner circle. But the president declined to take action after his government determined within the last two years that Israel was most likely the foreign entity behind the apparent espionage attempts, three former senior US officials told the news outlet.

“The reaction ... was very different than it would have been in the last administration,” one of those former officials told Politico. “With the current administration, there are a different set of calculations in regard to addressing this.”

Attempts to spy on federal officials in the nation’s capital are not uncommon and have happened long before Mr Trump and his associates moved into Washington. Still, the former intelligence officials noted past administrations would have issued a formal diplomatic reprimand – at the very least – towards Israel if it were found to have been planting spying devices near the White House.

“The Israelis are pretty aggressive” when it comes to their intelligence-gathering methods overseas, one former official said, adding: “They’re all about protecting the security of the Israeli state and they do whatever they feel they have to to achieve that objective.”

The officials also suggested the US has aggressive intelligence-gathering operations against Israel, with one of those former senior intelligence officials saying: “On the other hand, guess what we do in Tel Aviv?”

Experts are usually able to ascertain which foreign groups were responsible for attempts of espionage “depending upon the tradecraft of the people who put them in place”, one official explained.

They said analysts could then “figure out who’s been accessing them to pull the data off the devices”.

The Israeli government has previously denied the accusations after the stingray devices were found in Washington in 2017. In a statement on Thursday, Prime Minister Benjamin Netanyahu said: "There is a longstanding commitment, and a directive from the Israeli government not to engage in any intelligence operations in the US. This directive is strictly enforced without exception."

The White House did not respond to requests for comment.

Mr Trump has boasted that he has done more than any previous US president for Israel, recognising Jerusalem as its capital and moving the American embassy there from Tel Aviv. The move, in May last year, sparked protests in which more than 50 Palestinians were killed.

This year he recognised Israeli sovereignty over the disputed Golan Heights, saying the area was a “gift” to prime minister Benjamin Netanyahu, who reacted by comparing the US president to Cyrus the Great, an ancient Persian king.

Last month he tweeted a quote from a right-wing conspiracy theorist describing him as the “king of Israel” and saying that American Jews loved him like he was “the second coming of God”.

Support free-thinking journalism and attend Independent events

The president followed that up by declaring that Jewish Americans who vote for Democratic candidates show “a total lack of knowledge or great disloyalty” to Israel, a controversial statement which quickly sparked outcry. He also involved Mr Netanyahu in his battle with two Muslim Democratic politicians, asking him to block Ilhan Omar and Rashida Tlaib from entering Israel over what he described as antisemitic remarks.

Mr Trump was the first sitting US president to visit the Western Wall in Jerusalem. The trip generated controversy when his White House declined to say whether it believed the Western Wall belonged to Israel.