A Minneapolis man wounded in a shooting last Saturday on the rooftop patio of a popular downtown restaurant was involved in a previous shootout between several rival gangs, authorities said.

Demilo Martin, 28, was charged Friday in Hennepin County District Court with one count of felon in possession of a firearm stemming from another shooting that occurred a month earlier.

According to the County Attorney’s Office: Martin was allegedly at the scene of a gang rivalry shooting in Minneapolis on June 15.

The shooting occurred about 5 a.m. in the 2300 block of Kennedy Street NE. Police found 51 shell casings. Several vehicles and buildings sustained bullet damage.

“They concluded it was a shootout between several rival street gangs,” said the County Attorney’s Office.

Video surveillance from the scene allegedly showed Martin approaching the building, removing a semiautomatic pistol from his pants pocket, ejecting then reinserting the magazine and entering the building.

Martin allegedly told investigators that he is the man in the video.

Authorities allege that Martin is a member of the Young N’ Thuggin’ gang and was involved in or witnessed “several recent gang-related shootings.”

Martin did not have an attorney listed for his case.

The shooting at Crave American Kitchen & Sushi Bar at 825 S. Hennepin Av. occurred about 2 a.m. on July 13.

Martin was one of two people who suffered non-life-threatening injuries in the shooting.

“Mr. Martin is well-known to police,” Hennepin County Attorney Mike Freeman said in a statement. “… If we are successful in prosecuting him, he should be sentenced to a mandatory five years in prison. In the meantime, Minneapolis police can continue investigating him for other violent crimes as well as identify a suspect in the restaurant shooting.”

Martin’s 2005 juvenile adjudication in a criminal sexual conduct case makes him ineligible to possess a gun, authorities said.