A man convicted of murder for killing a woman when he drove into a crowd protesting a 2017 white nationalist rally in Charlottesville, Va., pleaded guilty to additional federal hate crime charges on Wednesday.

The man, James Fields Jr., 21, faced 30 federal charges for his actions at the “Unite the Right” rally. He pleaded guilty to 29 of them, including one count of a hate crime that resulted in the death of Heather Heyer, an anti-racism activist, and 28 counts for the injuries to nearly 40 other protesters. Each of the counts to which he pleaded guilty carries a maximum sentence of life imprisonment and a fine of up to $250,000.

In a letter submitted to the court, Attorney General William P. Barr directed federal prosecutors to forgo seeking the death penalty against Mr. Fields because of the plea agreement.

As part of the agreement, federal prosecutors dismissed one count of bias-motivated interference with federally protected activity resulting in death, referring to Mr. Fields’s act of violence during a state-sanctioned protest. It was the only count in the indictment that could have resulted in the death penalty, a Justice Department spokesman said.