WASHINGTON — With the legal battle over one iPhone now behind them, lawyers for the Justice Department and Apple resumed their sparring in another case on Friday, as prosecutors told a federal judge in Brooklyn that they still needed the company’s help to unlock a drug dealer’s iPhone.

While prosecutors described the demand in the Brooklyn case as routine, Apple said it reflected an attempt by the government to establish a precedent that could help unlock dozens or even hundreds of other phones.

Indeed, a judge in yet another case revolving around a locked iPhone — one in Boston involving a violent gang conspiracy — has directed Apple to help the Federal Bureau of Investigation extract data from the phone, according to documents unsealed on Friday.

The cases in Brooklyn and Boston represent the latest battlegrounds in the unusually prominent dispute between the government and Apple over the F.B.I.’s difficulties in breaking into encrypted phones.