An American citizen accused of violating Pakistani blasphemy laws was shot and killed in court.

Tahir Ahmad Naseem, 57, had been on trial at the Peshawar Judicial Complex Peshawar on charges that he had claimed to be a prophet, when he was shot six times. The shooter was identified by authorities asa local 19-year-old man named “Faisal.”

The United States urged Pakistan Thursday to overhaul the harsh law, which critics say often persecutes members of religious minorities, according to the New York Times.

HANS VON SPAKOVSKY: DESPITE TRUMP TWEET, ELECTION WON’T BE DELAYED — BUT ALL-MAIL VOTING POSES GRAVE DANGERS

FEINSTEIN: LETTING AMERICANS SUE CHINA OVER CORONAVIRUS RESPONSE WOULD BE 'HUGE MISTAKE'

Naseem had been lured to Pakistan from Illinois by people who wanted to entrap him using Pakistan's blasphemy laws, according to the State Department. Conular officers had been working with Naseem and his family since he was detained there in 2018.

“We grieve with the family of Mr. Naseem," said. Cale Brown, a State Department spokesperson. "We urge Pakistan to immediately reform its often abused blasphemy laws and its court system, which allow such abuses to occur, and to ensure that the suspect is prosecuted to the full extent of the law.”

CLICK HERE TO GET THE FOX NEWS APP

Ahmad Naseem had been a member of the Ahmadi sect, which was declared heretical under the Pakistani Constitution, according to the Times, but he left the group and claimed to be the messiah.

He was accused of blasphemy in 2018.