BALTIMORE, Md. - The gun used in a mass shooting that killed two people and injured at least 13 others was purchased legally in Maryland, the Jacksonville Sheriff's Office said.

Sunday, 24-year-old David was a lone shooter with a handgun who opened fire at a Madden 19 video game tournament in Jacksonville, Florida.

RELATED: Jacksonville mass shooting suspect ID'd: 24-year-old David Katz of Baltimore

According to police, Katz, who is a Maryland resident, brought two guns to the tournament, but only used one in the shooting. Both guns were purchased from a licensed dealer legally in Baltimore, Maryland.

"He did buy the guns recently, but I don't have the exact timetable," Sheriff Mike Williams said.

Authorities said Katz walked past patrons who were in other parts and went to gamers. They said he had a prior relationship with his victims.

Elijah Clayton Black, 22, and 28-year-old Taylor Robertson were killed, and 13 others were injured in the shooting. Twelve were shot and one was treated for non-gunshot wounds.

RELATED: Madden shooter’s Maryland background includes family, emotional health troubles

The motive of the shooting is unknown at this time.