Lori Lightfoot is a 56-year-old former federal prosecutor and practicing lawyer who has never before held elected office

In a historic first, a gay African American woman was elected mayor of America’s third largest city on Tuesday, as Chicago voters entrusted a political novice with tackling difficult problems of economic inequality and gun violence.

Lori Lightfoot, a 56-year-old former federal prosecutor and practicing lawyer who has never before held elected office, was elected the midwestern city’s mayor in a lopsided victory.

She beat Toni Preckwinkle, who is also an African American woman, by a wide margin of 74 to 26 per cent in early voting results with most ballots counted.

Lightfoot will become Chicago’s first openly gay mayor and the first African American woman to hold the post. Since 1837, Chicago voters have elected only one black mayor and one female mayor.

Ms. Preckwinkle is the chief executive of Cook County where Chicago is based, which analysts said worked against her during a change election as voters sought to shake up city hall.

“People (are) hoping for something different to come along. To be the vessel for that is overwhelming,” Ms. Lightfoot told reporters earlier after the polls opened.

Voters had left little doubt they want the next mayor to tackle major issues vexing the city of 2.7 million people -- especially economic disparities and gun violence that claims more lives than in other major American cities.

More than 550 people were killed in Chicago last year due to gang violence often fueled by the drug trade -- most in economically-struggling and majority African American neighborhoods.