NEW YORK — Luigi Mangione pleaded not guilty Friday to a federal murder charge in the killing of UnitedHealthcare CEO Brian Thompson. Prosecutors formally declared their intent to seek the death penalty, and the judge warned Justice Department officials to refrain from making public comments that could spoil his right to a fair trial.

Mangione, 26, stood between his lawyers and leaned toward a tabletop microphone as he entered the plea in Manhattan federal court. He responded “yes” when U.S. District Judge Margaret Garnett asked if he understood the indictment that charges him with gunning down Thompson outside a midtown hotel last December.

Asked how he wished to plead, Mangione said simply “not guilty” and sat down.

A cause célèbre for people upset with the health insurance industry, Mangione’s federal arraignment drew dozens of people to court, including former Army intelligence analyst Chelsea Manning, who served prison time for stealing classified diplomatic cables.

Some lined up for hours in front of the courthouse steps, trying to snag a seat inside. Others rallied across the street as a pair of advertising trucks drove around playing videos denouncing the health insurance industry and the death penalty.

Mangione, an Ivy League graduate from a prominent Maryland real estate family, faces separate murders in federal and state court, where he faces a maximum punishment of life in prison.

Prosecutors had expected the state case go to trial first, but Mangione’s lawyers said Friday that they want the federal case to take precedent because it involves the death penalty.