Political newcomer Lori Lightfoot has been elected Chicago mayor, becoming the first black female — and openly gay — leader of the city.

Lightfoot on Tuesday defeated Toni Preckwinkle, a former schoolteacher who served in the City Council for 19 years before becoming Cook County Board president in 2011.

The 56-year-old Lightfoot is a former federal prosecutor who campaigned on ridding Chicago’s government of corruption. She also said she wanted to help low-income and working-class people she believes have been “left behind and ignored” by Chicago’s political ruling class.

Lightfoot and Preckwinkle were the top two vote-getters in the February general election that saw 14 vie to succeed Mayor Rahm Emanuel. He decided against running for a third term.

Lightfoot will be sworn in May 20.