The two young men were described by police as "persons of interest" when they were taken into custody early on Sunday, a day after first lady Michelle Obama and dignitaries attended the funeral of Hadiya Pendleton.

Michael Ward, 18, and Kenneth Williams, 20, are charged with one count of first-degree murder, two counts of attempted murder and aggravated battery with a firearm. Chicago police spokeswoman Melissa Stratton said it is believed both men are gang members.

Honour student Hadiya, a popular high school majorette, was with a group of friends who took cover during a rainstorm under a canopy in a park about a mile from the Obama home on Chicago's South Side. Police said a man jumped a fence, ran towards them and opened fire with a handgun. Hadiya was struck in the back and died later that day. Two others were injured.

Police said none of the people in Hadiya's group was affiliated with gangs but the gunman apparently mistook one for a member of a rival gang that had encroached on his turf. The accused men live nearby.

Hadiya's death was one of more than 40 murders in Chicago last month, a total that made it the deadliest January in the city in more than a decade. But it was her background, her ties to the president's inauguration and the location of the park that thrust her death into the national headlines and put Chicago at the centre of a national debate over gun control.

Not only did the first lady attend the teenager's funeral, but the girl's parents will sit with Mrs Obama during the president's State of the Union address on Tuesday night. Barack Obama is due to return to Chicago three days later to discuss gun violence.

Murders in Chicago topped 500 last year for the first time since 2008, stoking residents' concerns about gun violence and leading the police department to put more officers on the street and to focus more on combating gangs. Just as the December killing of 20 children and six adults at a primary school in Newtown, Connecticut, brought renewed scrutiny of the nation's gun laws, the death of the popular Chicago teenager has cast the city's gun violence problem in a new light.

"The only time when the gun issue ever gets affected is when Newtown happens," Chicago's mayor Rahm Emanuel said. "What happens in urban areas around the country too often ... gets put to the side." He said while it was not wrong that massacres stirred such debate, what happened on the streets of Chicago and in other urban areas "gets put in a different value system". "These are our kids," he said. "These are our children."

Mr Emanuel joined police superintendent Garry McCarthy and Cook County state's attorney Anita Alvarez to announce they would push for tougher gun laws that would increase the minimum jail terms and require offenders to serve at least 85% of their sentences. They say the law now allows offenders to be released after serving no more than half their sentences and sometimes obtain their release after a matter of weeks.