Islamabad, Pakistan (CNN) -- A Pakistani judge ordered the government Tuesday not to hand over to American authorities a U.S. consular employee accused of killing two Pakistanis who allegedly tried to rob him.
The judge ordered Raymond Davis to remain in the custody of Pakistani authorities until further notice and for his name to be placed on the exit control list, said Chaudhary Hanif Khatana, a senior government lawyer.
The U.S. Embassy in Pakistan has called for the immediate release of the employee, saying he is being "unlawfully detained" by authorities in the city of Lahore.
Davis isn't cooperating with investigators or answering questions by claiming diplomatic immunity, Zulfiqar Hameed, a senior police official said.
The American was driving in a busy area known as Kartaba Chawk on Thursday when two boys on a motorcycle tried to rob him, said police official Faisal Rana. The American shot both boys, he said.
"The diplomat acted in self-defense when confronted by two armed men on motorcycles," the embassy said, without identifying Davis by name. "The diplomat had every reason to believe that the armed men meant him bodily harm."
The two men, who have a criminal history, had robbed a Pakistani citizen at gunpoint in the same area minutes earlier, the embassy said.
The diplomat's arrest violates the Vienna Convention, to which Pakistan is a signatory, the embassy said.
After the shooting, the boys' families filed a complaint against the consular employee, accusing him of two murders, a police spokesman said.
Investigators have also asked the U.S. consulate to identify and turn in a driver who hit and killed a pedestrian while driving to the scene of the shooting, Hameed, the police official, said.
A spokeswoman for the U.S. Embassy in Islamabad said she was not aware of the request.