An Ohio man pleaded guilty Wednesday to 29 federal hate crimes killing one and injuring 28 others when he drove his car into a crowd during a 2017 white nationalist rally.

He admitted he intended to kill others, according to the U.S. Department of Justice.

James Alex Fields Jr., originally from Boone County, Kentucky, was earlier convicted on state murder charges in the deadly car attack at the "Unite the Right" rally in Charlottesville.

More:Charlottesville: Life has been a 'living nightmare' since James Alex Fields struck her

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

The charges include one count of a hate crime act that resulted in the death of Heather Heyer, a 32-year-old paralegal, and 28 counts of hate crime acts that caused bodily injury and involved an attempt to kill other people within the crowd, according to the Department of Justice.

Each of the counts carries a maximum sentence of life in prison and a fine of up to $250,000.

“In the aftermath of the mass murder in New Zealand earlier this month, we are reminded that a diverse and pluralistic community such as ours can have zero tolerance for violence on the basis of race, religion, or association with people of other races and religions,” Attorney General William P. Barr said in a statement, adding, "These hate crimes are also acts of domestic terrorism."

In a statement of facts agreed to and signed by Fields, he admitted he intended to kill other victims he struck with his car.

Fields was convicted in December of first-degree murder for killing anti-racism activist Heather Heyer and injuring dozens of others assembled to protest against the white nationalists.

A jury found that Fields intentionally plowed his car into the crowd of people.

The Department of Justice said that before the attack, Fields admitted to using social media to espouse policies from Nazi-era Germany and to support violence against African-Americans, Jewish people and groups "he perceived to be non-white."

FBI Director Christopher Wray said in a statement that "everyone across the country felt the impact" of the violence in Charlottesville.

"This guilty plea underscores that we won’t stand for hate and violence in our communities," Wray said. "Together with our law enforcement and community partners, we’ll continue to aggressively investigate hate crimes, domestic terrorism and civil rights violations.”

The Associated Press contributed