An American jailed for shooting two Pakistanis is shielded by diplomatic immunity, a Pakistani official said Wednesday, but local courts are likely have the final say in a case that has ignited a bruising row between two strategic allies.

Despite signals the Pakistani government is yielding to U.S. pressure to back the release of consular employee Raymond Davis, his fate remained unclear as the killings stirred up fierce anti-U.S. sentiment that could put Pakistan's unpopular leadership at risk.

Davis shot dead two Pakistanis last month in what he said was self-defence during an armed robbery. The Lahore High Court will hold another hearing in the case Thursday, during which the United States is expected to present a petition to certify that Davis has diplomatic immunity and should be released.

But the Pakistani official said that would not guarantee his release.

We will present all relevant laws and rules about immunity before the court and will plead that prima facie it is a case of diplomatic immunity. But it is for the court to decide, the official said on condition of anonymity.

The row over the U.S. national is the latest issue straining ties between two nations that are supposed to be working to stamp out a tenacious Islamist insurgency that has fuelled attacks against U.S. soldiers in neighbouring Afghanistan.

President Barack Obama waded into the fray Tuesday, saying the United States was working with Pakistan, a major recipient of U.S. aid, to secure the release of the former U.S. special forces soldier now locked in a Lahore jail.

'BETWEEN THE DEVIL AND THE DEEP BLUE SEA'

The fragile government in Islamabad, mired in a battle against militants, struggling with a stagnant economy and fearful of backlash from its people, appeared to be willing to go only so far to placate its American allies.

We are facing difficult decisions. There is a political price, Prime Minister Yusuf Raza Gilani, speaking at a religious event in Islamabad, said Wednesday.

If we make one decision, the people won't support it. If we make another decision, the world doesn't support it. We're caught between the devil and the deep blue sea, he said.

Obama sent Senator John Kerry to Pakistan to help secure Davis' release.

Gilani, in a statement released by his office after meeting Kerry, said the situation could be defused if the United States, in accordance with Islamic sharia law, offered blood money to the families of the slain Pakistanis, and the payment was accepted.

The issue has become a lightning rod for anti-American sentiment in Pakistan, which the United States counts as an important, if unreliable, ally in its war against militancy.

While most officials are saying the court must weigh in, the case has revealed divisions within the Pakistani establishment.

Shah Mehmood Qureshi, who until last week was foreign minister, suggested Wednesday he may have been kept out of the government after a recent cabinet shuffle for asserting Davis did not qualify for blanket diplomatic immunity.

The question is, whatever happens, will the government be able to sell it to the public and the family of the victims. Right now it's a very emotional issue, said Rifaat Hussain, a professor at Quaid-e-Azam University in Islamabad.

Obama sent Senator John Kerry to Pakistan to help secure Davis' release. Prime Minister Gilani, in a statement released by his office after a meeting with Kerry, reminded Pakistanis that the United States was remorseful about the situation.

Gilani said a step towards easing U.S. payment of blood money to the deceased men's families under Islamic Sharia Law, if they accept, could help ease tensions.

ANOTHER EGYPT?

In the port city of Karachi, protestors beat effigies of Obama and Kerry with shoes. Imdad Sabir, a school teacher in Lahore, said Pakistan's integrity was at stake.

If our rulers give (Davis) to the United States, Pakistan will come out onto the streets and protest as people did in Egypt, he said, referring to the demonstrations that forced President Hosni Mubarak out of power this month.

Pakistan's al Qaeda-linked Taliban has warned the government it will punish any move to release him.

The U.S. Justice Department would conduct a criminal investigation into the shooting, Kerry said, but it is unclear whether such a probe would lead to a trial.

Adding to the confusion is the murkiness over Davis' role at the U.S. consulate. Pakistan's Dawn newspaper said the government will inform the Lahore High Court that Davis' status as a member of the consulate's administrative and technical staff made him eligible for diplomatic immunity.

While consular staff may not qualify for the same immunity that diplomats get, the United States says Davis was assigned to the U.S. embassy in Islamabad and is therefore covered.

While Pakistani courts are now seen as relatively independent, former U.S. ambassador Anne Patterson called the Lahore court where Davis could be tried unpredictable and anti-American in a 2010 cable revealed by WikiLeaks.

(Additional reportin