A CIA contractor indicted earlier in the day on two murder charges in Pakistan was acquitted and released on Wednesday after a deal to pay “blood money” to the victims’ families was reached, Punjab Law Minister Rana Sanaullah told Reuters.

The deal ends a long-simmering diplomatic standoff between Pakistan and the United States.

“The court first indicted him but the families later told court that they have accepted the blood money and they have pardoned him,” Punjab Law Minister Rana Sanaullah told Reuters. “The court acquitted him in the murder case.”

Raymond Davis, 36, shot dead two Pakistanis in the eastern Punjab city of Lahore on Jan. 27 following what he described as an attempted armed robbery. He said he acted in self-defence and the United States says he has diplomatic immunity and should have been immediately repatriated.