A Minnesota man — who allegedly punched a Trump supporter in the contentious scene outside the president’s Keep America Great rally in Minneapolis two weeks ago — was charged with assault Wednesday after investigators used videos of the alleged attack to identify him, federal prosecutors said.

TRUMP PROTEST IN MINNEAPOLIS ERUPTS IN PEPPER SPRAY, MAGA HAT FIRES

Dwight Pierre Lewis, 31, of Richfield, Minn., was charged with one count of third-degree felony assault in Minnesota’s Hennepin County District Court. He surrendered to police Monday and was being held on a $40,000 bond ahead of his court appearance Thursday, FOX 9 Minneapolis reported.

Authorities said Lewis admitted to punching another man outside President Trump’s campaign stop in Minneapolis on Oct. 10. The 22-year-old victim told police the next day that he received several stitches after a shirtless man attacked him as he was trying to leave the rally, The Epoch Times reported.

Investigators said they used several videos taken by news organizations and posted to social media to identify Lewis as the suspect. Lewis' criminal record includes four previous convictions for disorderly conduct, two for assault and one each for property damage and making terroristic threats, the Minneapolis Star Tribune reported.

Riot police — both on bicycles and horseback — formed a barrier between Trump supporters and anti-Trump protesters outside the rally as tensions rose. Hundreds of anti-Trump protesters set fire to Make America Great Again hats and other memorabilia, as some threw objects at police, Fox News’ Matt Finn, who was at the scene, reported.

CLICK HERE FOR THE ALL-NEW FOXBUSINESS.COM

Other video posted to social media captured a scene where anti-Trump protesters shouted profanity at, as well as shoved and punched, those who left the rally. The Star Tribune reported that police deployed pepper spray.

Trump — who fell just 40,000 votes short of defeating Hillary Clinton in Minnesota in 2016 --- addressed more than 20,000 supporters at the rally. Minnesota is expected to be battleground territory going into 2020, the president’s campaign manager, Brad Parscale, told the Times.