ISLAMABAD, PAKISTAN - A U.S. official being held in the fatal shooting of two Pakistani men told a court in the eastern city of Lahore on Friday that he had killed them in self-defense.

The official, based at the U.S. Consulate in Lahore, said the men had tried to rob him while he waited at a busy intersection in his car. A second consular vehicle that he summoned for help struck and killed a motorcyclist as it sped to the scene, police said.

A judge ordered the official held in custody for six days for further questioning.

Pakistani officials insisted Friday that the American, identified as Raymond Allen Davis, would receive no special treatment while possible charges of murder and illegal weapons possession are investigated.

"No one will be allowed to breach the law in Pakistan," Interior Minister Rehman Malik told legislators. "The law will take its due course."

But other Pakistani and U.S. officials, who would not discuss the sensitive matter on the record, said that Davis was clearly in the country on a diplomatic passport and visa, and was immune from any prosecution. The U.S. government has demanded his release on that basis, officials said. In the meantime, the embassy has asked for consular access to him.

The incident has generated enormous media coverage in Pakistan and threatened to strain U.S. relations with the country, a key ally and recipient of U.S. assistance. The deaths are being widely depicted as an illustration of Americans' disregard for ordinary Pakistanis and as a test case of the unpopular central government's capacity to stand up to its U.S. sponsors.

Davis arrived in Pakistan in September 2009 as a "technical adviser" to the consulate in Lahore, according to sources who said his job was to assist in vetting visa applicants. His initial three-month diplomatic visa, listing his birth year as 1974 and a home address in Las Vegas, has been repeatedly extended at U.S. request since then.

The CIA has declined to comment on whether he worked for the agency, although Pakistani officials said they do not believe he is an intelligence agent. Under special budget provisions, the State Department has given diplomatic status to hundreds of temporary employees hired in recent years, some of them through contractors, to bolster the ranks of rapidly expanding embassies in both Pakistan and Afghanistan.

Officials have declined to say why Davis had a gun.

Except for those assigned to the Peshawar consulate, in the northern part of the country near tribal areas, U.S. diplomatic officials are permitted to drive alone in their own vehicles in Pakistan, although many prefer instead to travel with security details. Robberies are fairly common, and Islamist militants stage regular bombings and kidnappings.

The use of security convoys by embassies and the question of whether diplomats should be permitted to carry weapons have been sources of controversy in recent years.

At a news conference in Lahore, Rana Sanaullah, the law minister for Punjab province, said Davis told authorities that he had withdrawn money from a bank shortly before the alleged holdup. Police said Thursday that they recovered two pistols from the dead men, but Sanaullah said he had doubts that Davis shot in self-defense.

A police official, who spoke on the condition of anonymity because he was not authorized to discuss the case, told The Washington Post on Friday that an autopsy showed both victims had been shot multiple times, including in the back.

Sanaullah said that the Lahore consulate had agreed to a police request to turn the driver of the second vehicle, not a U.S. citizen, over to police.

Demonstrators burned American flags at small anti-U.S. protests in several Pakistani cities Friday. Relatives of Fahim Hussain, one of the men who was shot, stopped traffic in their Lahore neighborhood and placed his body on the street, where protesters gathered to demand justice.

"We will not allow the government to sell the blood of our son," said the victim's father, Shamsad Hussain, 55. "The killer should be hanged."

One government official suggested that the demonstrations, and anti-U.S. media coverage, were being promoted by opposition political leaders whose power base is in the Punjab capital of Lahore. The opposition, headed by former prime minister Nawaz Sharif, was put on the defensive with the assassination this month of Punjab Gov. Salman Taseer, an appointee of President Asif Ali Zardari, by Taseer's local bodyguard.

Sahi, a special correspondent, reported from Lahore. Special correspondent Shaiq Hussain in Islamabad and staff writers Greg Miller and Karen DeYoung in Washington contributed to this report.