Seven people were injured in a shooting at a flea market in Texas on Sunday.

Jose Manuel Guerrero-Reyes, 25, was charged with felony aggravated assault after shooting at shoppers inside a flea market near Aldine, Texas, according to the Harris County Sheriff Ed Gonzalez.

According to The Houston Chronicle, the shooting happened at the Mercado Sabadomingo flea market on Sunday night during a “live dance” inside the building.

HCSO officials said Mr Guerrero-Reyes cooperated with deputies.

Mr Guerrero-Reyes told investigators he had a gun in his pocket that went off accidentally, firing into the floor and ricocheting through the crowd, striking one man through the leg and injuring six others.

Mr Gonzalez said Mr Guerror-Reyes’ account did not match evidence found at the scene and called for more witnesses to the event to come forward. Mr Gonzalez said the shooter had no connection to the man who was first shot.

"He says apparently he had the gun in his pocket, but right now that doesn’t seem to match with the evidence we have. We don’t know who he may have been aiming to," Mr Gonzalez said. "There appears to be no connection to initial male that was more seriously wounded."

According to HCSO, the flea market has signs posted prohibiting weapons on the premises and security cameras throughout the building.