Apple CEO Tim Cook released a statement arguing against the FBI's recent order to hack into the San Bernardino shooter's iPhone 5c. (Jhaan Elker/The Washington Post)

Roughly half of Americans say Apple should give the government access to the contents of an iPhone used by one of the San Bernardino shooters, according to a new survey.

The Pew Research Center, which conducted the survey over the weekend, found substantial support for the Justice Department in its roiling fight with Apple over the software designed to protect consumers' personal data.

Fifty-one percent of respondents said Apple should take steps to "unlock" the device, which the company could do by disabling a feature that wipes the phone's storage after 10 incorrect passcode attempts. Meanwhile, just 38 percent said Apple should keep that protection in place, and 11 percent said they weren't sure what to think.

The findings are grim news for Apple, a company that has sought to position itself as a champion of privacy. In recent months, chief executive Tim Cook has vocally opposed efforts by some government officials to gain access to iOS. In a letter to employees Monday, Cook said that consumers' data is "under siege."

But the latest Pew poll suggests most Americans disagree with Cook. Security officials and some lawmakers say there is no reason why Apple devices should not be expected to comply with lawful requests for information by the authorities. Officials have criticized Apple's position as a "marketing strategy," something Apple has denied.

Cook has argued that the current dispute with the Justice Department is one battle in a much larger fight.

"This case is about much more than a single phone or a single investigation, so when we received the government’s order we knew we had to speak out," Cook wrote. "At stake is the data security of hundreds of millions of law-abiding people, and setting a dangerous precedent that threatens everyone’s civil liberties."

The technology industry has rallied to Apple's defense. Google chief executive Sundar Pichai tweeted last week that allowing the Justice Department to move ahead would represent a "troubling precedent."

And on Monday, Facebook chief executive Mark Zuckerberg said he was "sympathetic with Apple."

Over time, public opinion may yet shift in Apple's direction as people learn more about the technology and the case at hand. A similar pattern played out slowly after Edward Snowden released a trove of information about the National Security Agency. Polls immediately following Snowden's disclosures showed that most Americans supported the NSA's surveillance programs, but that changed several months later when a majority of Americans said they disapproved of the government surveillance, particularly when it came to phone calls and Internet communications.