India’s intelligence agency sparked outrage in Pakistan and self-deprecatory jokes at home this week after it listed ordinary Pakistani shopkeepers as terrorists on a mission to attack some of India’s landmark institutions.

The Research and Analysis Wing, India’s premier intelligence agency, issued an advisory to state governments in which it said that five trained militants from Pakistan’s banned Lashkar-i-Taiba group had sneaked into India with fake identities to attack a nuclear facility, oil refinery, seaport and defense academy.

On Wednesday, a day after U.S. Secretary of State Hillary Rodham Clinton left New Delhi after delivering some tough comments on Pakistan, Mumbai police released the photographs of the five men.

Within hours, a Pakistani television channel reported that two of the three men on the list were shopkeepers and one was a guard, all living in Lahore, and that none of them had ever left Pakistan.

“India bungles while Pakistan laughs,” the Mail Today newspaper said of the embarrassing blunder. Twitter buzzed with jokes about the Research and Analysis Wing, with some tweeters offering their own lists to the agency.

The incident prompted anger and derision in Pakistan. Muhammad Fayyaz Butt, the head of a traders association for an electronics market where two of the men own shops, condemned India’s “irresponsible and biased attitude.”

On Thursday, the two shopkeepers went to the Lahore High Court, seeking protection from possible action against them by India.

Indian Law Minister Salman Khurshid offered an explanation to reporters in New Delhi on Friday. “We can’t be too careful,” he said. “We have had some bad experiences in the past. And therefore to err on the right side is something we can’t complain about.”

It was not the first time India has made such a faux pas. A year ago, the government released a most-wanted list of 50 Indian fugitives who it claimed were hiding in Pakistan. Two men on the list turned out to be in India, one of them a prisoner in a Mumbai jail.