A recent university graduate who is charged in four killings that terrorised a Florida city over the past 51 days used the same gun in all of the shootings, a police chief has said.
Brian Dugan also said that Howell Emanuel Donaldson targeted people near bus stops in Tampa with "no apparent motive".
The crack in the case came yesterday when Donaldson, 24, took a bag with a loaded handgun to his job at a McDonald's restaurant and asked a co-worker to hold it while he went across the street, authorities said.
Workers thought that was odd and when Donaldson left, they reported the gun to a police officer who was doing paperwork there, setting off an investigation that linked him to the shootings.
Aside from matching shell casings at the shootings, authorities said location data from Donaldson's mobile phone put him at the scene of at least three of the killings in the Seminole Heights area.
"The gun is what we needed," Mr Dugan said at a news conference surrounded by family members of the victims.
Police had earlier released black-and-white surveillance video showing a man in a hoodie as a possible suspect and by Halloween the fear was so great that police escorted children while trick-or-treating.
"We had a community that was on edge," Mayor Bob Buckhorn said.
"Today the light shines. The darkness is over. This community begins the healing process."
Donaldson told investigators that he was unfamiliar with the Tampa area where the shootings occurred.
He then asked for an attorney but arrest records do not list one and the police chief said he did not know if he had a lawyer yet. He is scheduled for a first appearance hearing tomorrow.
Donaldson graduated from St Johns University in New York in January 2017, according to school spokesman Brian Browne.
Police in New York said Donaldson had been arrested in May 2014 but the arrest was sealed and no details were available.
The tip that led police to Donaldson came from one of his co-workers at an Ybor City McDonald's, which is near Seminole Heights.
Police say Donaldson bought the gun from Shooter's World in Tampa on October 3 along with a 20-round box of bullets. The first killing happened six days later.
Detective Austin Hill wrote in a police report that Donaldson told investigators "no one except for himself had control of the Glock firearm since his purchase".
Authorities said a search of Donaldson's mobile phone found location data that indicated three days of recorded times and activities corresponding with the first three shootings.
Residents and police had been on edge since October 9 when 22-year-old Benjamin Mitchell was shot to death.
On October 11, 32-year-old Monica Hoffa was killed and on October 19 Anthony Naiboa, 20, was killed after taking the wrong bus home from his new job. On November 14, 60-year-old Ronald Felton was killed.
All of the October victims were either getting on or off a city bus, or were at a bus stop when they were shot, police said.