The U.S. Justice Department is expected to withdraw its legal action in California seeking to force Apple to unlock an encrypted iPhone used by one of the San Bernardino shooters, a law enforcement official familiar with the situation said.

Apple declined to immediately comment on Monday.

Apple has been fighting a court order obtained by the Federal Bureau of Investigation last month, which required the company to write new software to disable passcode protection and allow access to the phone used by one of the San Bernardino, California shooters, Rizwan Farook.

U.S. officials said last week that they were hopeful they would be able to unlock the iPhone without help from Apple.

(Reporting by Dan Levine in San Francisco; Writing by Eric Beech; Editing by Tom Brown)