At a parade marking America's Independence Day, an unidentified gunman opened fire on Monday in Highland Park, Illinois, killing at least six people.

According to initial media reports, another 24 people were injured in the attack about 40 kilometers north of Chicago.

The shooter, allegedly a white man with long black hair between the ages of 18 and 20, is said to have fired into the crowd from the roof of a commercial building.

He was able to escape after the shots were fired shortly after 10 a.m. (local time).

The Highland Park Police Department and the Lake County Sheriff later recovered his rifle.

Eyewitnesses described how hundreds of visitors and parade participants panicked and tried to escape.

Many initially mistook the shots for firecrackers that are traditionally set off in the United States on Independence Day, July 4th.

"On a day when we should celebrate togetherness and freedom, we mourn the tragic loss of life," Highland Park Mayor Nancy Rotering said at a news conference hours after the attack.

The city, which has around 30,000 residents, is one of the more affluent suburbs of Chicago and is known for buildings by influential architects such as Frank Lloyd Wright, Howard Van Doren Shaw and David Adler.