JERUSALEM - Israel's Supreme Court on Monday ordered an end to a controversial surveillance program to track COVID-19 infections through cellular phone location data, citing concerns about the country spying on its own citizens.

"The State of Israel is the only Western democracy that enlisted its clandestine spy agency in the war against the coronavirus pandemic," wrote Justice Isaac Amit in the 73-page ruling.

Nearly one year ago, the Israeli government ordered the Shin Bet domestic intelligence agency, usually charged with monitoring Palestinian and Israeli extremists, to monitor Israelis' movements through their cellphones. Those deemed to have come in contact with confirmed virus carriers received text messages ordering them to quarantine.

Prime Minister Benjamin Netanyahu said the pandemic justified the infringement on privacy. But Israeli lawmakers and the head of Israel's public health physicians association opposed the surveillance program, citing privacy concerns. Some Israelis said they received text messages in error.

In its ruling, the Supreme Court said there were concerns the spying could become permanent, and that human contact tracers are more effective at tracking COVID-19 infections than the surveillance technology. It ruled that as of March 14, Israel may only employ cellphone tracking in cases where Israelis refuse to cooperate with contact tracers.

Amit compared the surveillance program to Big Brother in George Orwell's novel 1984 and alluded to the 1997 horror film I Know What You Did Last Summer.

"What did you do last summer? You don't remember? Do not worry, I, Big Brother, know what you did last summer," wrote Amit in the ruling. "No, this is not a horror film but rather the reality of our lives this past year."

Copyright 2021 NPR. To see more, visit https://www.npr.org.