A man convicted on state murder charges in a deadly car attack at a white nationalist rally in Virginia has pleaded guilty to federal hate crime charges.

James Alex Fields Jr, of Maumee, Ohio, faced 29 federal charges stemming from the “Unite the Right” rally in Charlottesville on 12 August 2017.

Fields, 21, was convicted in December of first-degree murder and other state charges for killing the antiracism activist Heather Heyer and injuring dozens of others. A jury found that Fields intentionally plowed his car into a crowd of people protesting against the white nationalists.

On Wednesday, Fields admitted he violated federal hate crime laws when he targeted the group.

Fields appeared stoic, with hands folded in front of him for much of the hearing. He did not speak, except to repeatedly respond “yes, sir”, when the US district judge Michael Urbanski asked him if he was pleading guilty knowingly and voluntarily. Urbanski scheduled sentencing for 3 July. Fields faces a life sentence.

James Alex Fields Jr. Photograph: Eze Amos/AP

The “Unite the Right” rally drew hundreds of white nationalists to Charlottesville to protest the planned removal of a statue of the Confederate general Robert E Lee. Hundreds more turned out to protest against the white nationalists.

Donald Trump sparked a national uproar when he blamed the violence at the rally on “both sides”, a statement critics saw as a refusal to condemn racism.

The car attack by Fields came after violent brawling between the two sides prompted police to disband the crowds.

During his state trial, prosecutors said Fields, who described himself on social media as an admirer of Adolf Hitler, drove his car directly into a crowd of counter-protesters because he was angry after witnessing earlier clashes between the two groups.

The jury rejected a claim by Fields’s lawyers that he acted in self-defense because he feared for his life after witnessing the earlier violence.

More than 30 people were hurt in the car attack. Some who received life-altering injuries described them in anguished detail during the state trial.

Jurors in Fields’s state trial recommended a life sentence plus 419 years, although a judge still has to decide on the punishment. Sentencing is scheduled for 15 July.