The suspected gunman who opened fire at a 4 July parade in a Chicago suburb had planned the attack for weeks and wore women's clothes to try to cover up his facial tattoos, police have said.

Six people were killed and more than 36 were wounded in yesterday's incident in the city of Highland Park.

Authorities confirmed that the alleged gunman, who is aged 21, bought the gun legally, adding that the victims of the attack appeared to have been targeted at random.

The suspect, Robert E Crimo III, was taken into custody yesterday after surrendering to police. Authorities are still considering what criminal charges to bring.

Police said they currently do not know what the motive was for the shooting.

Highland Park Mayor Nancy Rotering said the community of 30,000 was still in shock from yesterday's attack.

"This tragedy should have never arrived at our doorsteps," she told NBC News.

"As a small town, everybody knows somebody who was effected by this directly and, of course, we are all still reeling."

Ms Rotering added that she knew the suspect when he was a little boy and a Cub Scout and she was a Cub Scout leader.

US President Joe Biden said earlier that 'liberty is under assault' in a Fourth of July speech that highlighted gun safety and unity over division.

Some of those killed in the mass shooting at the Highland Park parade have now been named.

They include a teacher at a synagogue and a man in his 70s who came from Mexico to visit his family.

Nicolas Toledo was the first victim identified last night by his family.

"My grandfather Nicolas Toledo father of eight and grandfather to many left us this morning July 4th, what was supposed to be a fun family day turned into a horrific nightmare for us all," said his granddaughter, Xochil Toledo.

"Not only was Nicolas a loving man, creative, adventurous and funny. As a family we are broken, and numb," she said.

Law enforcement officers investigate the area around Highland Park in Chicago after shooting

Mr Toledo had been visiting his family for about the past month. He spent his final days swimming and fishing and being among relatives, his family told media.

Another person killed in the shooting was Jacki Sundheim, a teacher at a Highland Park synagogue. The North Shore Congregation Israel confirmed her death in an email to congregants.

"There are no words sufficient to express the depth of our grief for Jacki's death and sympathy for her family and loved ones," the synagogue said.

"Jacki's work, kindness and warmth touched us all, from her teaching at the Gates of Learning Preschool to guiding innumerable among us through life's moments of joy and sorrow,all of this with tireless dedication," it added.

The synagogue said she was survived by her husband and daughter.

Aerial footage of people running after shots were fired in Philadelphia

Elsewhere, two police officers were shot last night in the US city of Philadelphia.

Both officers in Philadelphia were released from hospital after suffering non-life threatening injuries, Philadelphia Mayor Jim Kenney said. Police were searching for the gunman.

Video cited by local media showed people running from the Benjamin Franklin Parkway in Philadelphia after shots were fired.

The gunfire broke out yesterday evening near the Philadelphia Museum of Art on the final day of a festival with a large number of people watching a fireworks show after a concert.

"There is a security incident on the Benjamin Franklin Parkway," emergency authorities said, referring to the shooting.

Police instructed people in surrounding buildings to shelter in place.

"I didn't hear the shots, but the cops were like, 'Run, run,run,'" one woman told an NBC affiliate.

One officer sustained a graze wound to the head and the other a gunshot wound to the right shoulder, according to NBC10.