The 21-year-old man arrested for a deadly mass shooting at a July 4 parade in an affluent Chicago suburb has confessed and admitted he considered a second attack while on the run, officials said Wednesday.

Illinois State Police also addressed mounting questions about how Robert Crimo, who had a history of mental health issues and threatening behavior, was able to legally purchase at least five firearms.

After fleeing the parade shooting scene in Highland Park, Illinois, Crimo drove to Madison, Wisconsin where he thought about attacking another July 4 event, police said.

"He seriously contemplated using the firearm he had in his vehicle to commit another shooting," police spokesman Christopher Covelli said.

This booking photo released by the 19th Judicial Circuit Court in Lake County, Illinois, shows July 4 parade shooting suspect Robert Crimo
This booking photo released by the 19th Judicial Circuit Court in Lake County, Illinois, shows July 4 parade shooting suspect Robert Crimo 19th Judicial Circuit Court via AFP / Handout

Prosecutor Ben Dillon said during a bond hearing for Crimo that the suspect had confessed to carrying out the shooting in Highland Park, which left seven people dead and at least three dozen injured.

Among those killed were the parents of a two-year-old boy, Aiden McCarthy. A GoFundMe donation page set up for the child had raised over $2.5 million as of Wednesday.

Judge Theodore Potkonjak ordered Crimo, who has been charged with seven counts of first-degree murder, to be held without bail and to appear on July 28 for a preliminary hearing.

Crimo, dressed in a black shirt, attended by video and listened impassively as prosecutors recounted details of the shooting.

He was asked by the judge if he had a lawyer and responded that he did not. The judge appointed a public defender.

Crimo used a fire escape to access the roof of a building overlooking the parade route and fired more than 80 rounds on parade-goers
Crimo used a fire escape to access the roof of a building overlooking the parade route and fired more than 80 rounds on parade-goers GETTY IMAGES NORTH AMERICA via AFP / Mark Borenstein

Dillon, the prosecutor, said Crimo had "provided a voluntary statement confessing to his actions."

Crimo climbed on to a rooftop overlooking the parade route armed with a semi-automatic rifle, he said.

"(He) dressed up as a girl and covered his tattoos with makeup" to conceal his identity, Dillon added.

Crimo has several distinctive facial tattoos including the word "Awake" above his left eyebrow and the number "47" on his temple.

A member of the Lutheran Church Charities assembles a memorial for the victims of a mass shooting at July 4 parade in Highland Park, Illinois
A member of the Lutheran Church Charities assembles a memorial for the victims of a mass shooting at July 4 parade in Highland Park, Illinois GETTY IMAGES NORTH AMERICA via AFP / Jim Vondruska

Dillon said Crimo fired three 30-round magazines from his rifle into the parade crowd before fleeing.

He dropped his weapon in an alley and then drove to Madison armed with another gun in his car.

He considered attacking a celebration there but "indications (are) that he didn't put enough planning forward to commit another attack," Covelli said.

US Vice President Kamala Harris (R) hugs Highland Park Mayor Nancy Rotering (L) during a visit to the site of a shooting that left seven people dead in Highland Park, Illinois
US Vice President Kamala Harris (R) hugs Highland Park Mayor Nancy Rotering (L) during a visit to the site of a shooting that left seven people dead in Highland Park, Illinois AFP / KAMIL KRZACZYNSKI

Crimo returned to the Chicago area and was captured about eight hours after the initial attack following a brief car chase.

According to police, Crimo has a history of mental health problems and threatening behavior, but his firearms were purchased legally.

Police were called to Crimo's home twice in 2019: once in April to investigate a suicide attempt and again in September because a relative said he had threatened to "kill everyone" in the family.

Police removed a collection of knives from the home but did not make any arrests. The knives were returned later after Crimo's father said they were his.

In December 2019, Crimo, who was then 19, applied for a firearms permit which was sponsored by his father because he was under 21, police said.

Because no formal complaints had been lodged in connection with the earlier incidents, there were no grounds to deny the permit, police said.

Crimo subsequently purchased several other guns.

Crimo, whose father owns a deli in Highland Park, was an amateur musician billing himself as "Awake the Rapper."

The authorities are investigating online posts and videos made by Crimo which include violent content alluding to guns and shootings.

One YouTube video featured cartoons of a gunman and people being shot.

"I need to just do it," a voice-over says. "It is my destiny. Everything has led up to this. Nothing can stop me, not even myself."

The July 4 shooting was the latest in a wave of gun violence plaguing the United States, where about 40,000 deaths a year are caused by firearms, according to the Gun Violence Archive.

The divisive debate over gun control was reignited by two massacres in May that saw 10 Black people gunned down at an upstate New York supermarket, and 19 children and two teachers slain at an elementary school in Texas.

Police in Richmond, Virginia, said Wednesday they had foiled a potential mass shooting during the city's Independence Day celebrations after receiving a tip from a member of the public.

The call led police to a residence on July 1 where they found two assault rifles, a handgun, and 223 rounds of ammunition.

Julio Alvardo-Dubon, 52, and Rolman Balacarcel, 38, were arrested on firearms charges.

"Their intent was to conduct a mass shooting at our 4th of July celebrations," Richmond police chief Gerald Smith said.