Obama insisted the "simple principle" of diplomatic immunity meant that Pakistan must release the 36-year-old U.S. official, Raymond Allen Davis. Davis has been held since the shootings almost three weeks ago.
"If it starts being fair game on our ambassadors around the world, including in dangerous places where we may have differences with those governments ... that's untenable," Obama said at a news conference, his first public remarks on the case. "It means they can't do their job. And that's why we respect these conventions and every country should as well."
The Davis case has become a flashpoint for Pakistani nationalism and anti-American suspicion, making it harder for Pakistani authorities to back down despite intense U.S. pressure.
Thousands have rallied to demand that Davis be hanged and the Taliban have threatened attacks against Pakistani officials involved in freeing the Virginia native.
The disagreement has risked spinning out of control in recent days amid dangerous anti-American sentiment in Pakistan and U.S. threats of stronger Pakistan sanctions. Partly as a punishment, the U.S. over the weekend postponed a major security conference that was scheduled with Afghanistan and Pakistan later this month.
Obama warned that Davis' detention risked further straining relations between the countries, and said local prosecution of a diplomat posed a threat to American diplomacy in general.
Davis was not an ambassador, but the United States has not spelled out his duties.
The United States insists that he carries diplomatic immunity from prosecution just as diplomats and embassy employees of other nations do in the United States.
Obama spoke after sending Sen. John Kerry, D-Mass., to smooth over relations with Pakistan, whose cooperation is needed to rout insurgents fighting U.S. troops across the border in Afghanistan and al-Qaida fighters hiding in remote frontier zones.
Kerry reached out to Pakistan's government, promising a U.S. criminal investigation into the shooting if Davis is released. He took a softer public stance than many in the administration, expressing regret and acknowledging that such deaths need to be examined.
"It is customary in an incident like this for our government to conduct a criminal investigation. That is our law. And I can give you the full assurance of our government today that that will take place," Kerry told reporters in the eastern city of Lahore, where the shootings occurred.
"So there is no such thing as a suggestion that something is out of law or that America thinks somehow we're not subject to the law."
The U.S. says Davis shot in self-defense as armed men tried to rob him in Lahore last month. The Justice Department confirmed Tuesday that it would look into the shootings.
There has been controversy in Pakistan over the fact that Davis was armed. A senior U.S. official has told The Associated Press that Davis was authorized by the United States to carry a weapon, but that it was a "gray area" whether Pakistani law permitted him to do so.
Davis was shown on Pakistani TV telling police that he was a consultant for the U.S. consulate in Lahore and that he worked for the RAO - an apparent reference to the Americans' Regional Affairs Office.
Obama, who spoke to Pakistani President Asif Zardari about the case last week, declined Tuesday to elaborate on what threats he laid out for Pakistan if it refuses to act. But he implied that there would be consequences.
"We've been very firm about this being an important priority," Obama said, adding that the U.S. would continue working with the government in Islamabad on getting Davis released.
Pakistan's government has avoided a definitive stand on Davis' legal status because of spreading public anger over the shootings.
The Lahore police chief declared last week that Davis committed "an intentional and cold-blooded murder."
The Lahore High Court will hold a hearing about Davis' status Thursday, and a Pakistan official said most legal experts in the government believe Davis should enjoy immunity. But the government was still prepared to leave the final decision to the court, the official told The Associated Press on condition of anonymity because of the subject's sensitivity.
Part of the confusion over Davis' status lies in his background. The administration insists that Davis was part of the embassy's "administrative and technical staff," but Pakistani media reports have focused on him being a former Special Forces soldier who runs an American "protective services" company with his wife.
The AP also obtained a photocopy of an ID and a salary document that Davis apparently gave Pakistani authorities, showing that he was scheduled to be paid $200,000 from Sept. 21, 2010, until Sept. 20, 2011, for "overseas protective sec. svcs.," training, administration work and insurance and travel expenses.
Davis is identified as a Defense Department contractor on the ID card.
The U.S. Embassy says Davis has a diplomatic passport and a visa valid through June 2012, and that Pakistan was notified of Davis' assignment more than a year ago.
Obama didn't delve into these nuances Tuesday, declaring Davis simply as "our diplomat in Pakistan."
He also linked the case to sensitive international political efforts that Davis surely never would have played a part in, warning of the threat local prosecution poses to "ambassadors or our various embassy personnel (who) are having to deliver tough messages to countries where we disagree with them."
After the shootings in Lahore, Davis called for backup. The American car rushing to the scene hit a third Pakistani, a bystander, who later died.
State Department spokesman P.J. Crowley said Monday the vehicle contained U.S. Embassy staff. Pakistani police want to question the car's driver and passengers as well, though it is highly unlikely those staffers - especially if U.S. citizens - are still in Pakistan.
Associated Press writers Babar Dogar in Lahore, Pakistan, Heidi Vogt, Nahal Toosi, Zarar Khan and Asif Shahzad in Islamabad, and Matthew Pennington and Matthew Lee in Washington contributed to this report.