Lori Lightfoot made Chicago history twice over Tuesday night: She became the city’s first black female mayor as well as the city’s first openly gay mayor.

Lightfoot, a 56-year-old former federal prosecutor, defeated more than a dozen challengers en route to winning her first elected office.

She is now set to lead the nation’s third-largest city as it continues to grapple with gun violence, alleged public corruption, ongoing efforts to reform the police force and an exodus of black residents. In the runoff election on Tuesday, she defeated Toni Preckwinkle, president of the Cook County Board of Commissioners, in a contest fraught with historic meaning, given that it featured two black women vying to succeed outgoing Mayor Rahm Emanuel.

The Associated Press called the race less than an hour after polls closed, with Lightfoot leading Preckwinkle by nearly 50 percentage points.

In her victory speech, Lightfoot said she was committed to ending the broken political culture of Chicago.

“We can and we will break this city’s endless cycle of corruption,” she said, raising her fist in the air. “And never again, never ever, allow politicians to profit from elected positions.”

The significance of the moment was not lost on the crowd at the Hilton hotel on South Michigan Avenue where Lightfoot’s election party took place.

“I did not think I would see this in my lifetime,” said Leslie Page-Piper, 60, of Englewood, who volunteered for the Lightfoot campaign.

“And it happened just like that,” he said, snapping his fingers. “I’m overwhelmed.”

Lightfoot’s campaign

Lightfoot, who had previously led Chicago’s civilian board handling police discipline cases and worked for the law firm Mayer Brown, had been an underdog during the mayoral race. A relative unknown seeking her first electoral victory, Lightfoot drew inevitable comparisons to Harold Washington, Chicago’s first black mayor who ran a grass-roots campaign in 1983.

Mirroring other campaigns that have unfolded on local and national levels alike, Lightfoot ran on promises of change as she sought to defeat Preckwinkle, a veteran elected official who has been president of the county board for nearly a decade.

Emanuel stunned observers last fall when he announced his decision not to seek a third term, which gave way to a crowded scrum of 14 candidates seeking to succeed him. Lightfoot and Preckwinkle emerged in February as the two final contenders from a group that included a former police superintendent, former state representatives and a man who was the son and brother of former mayors.

Preckwinkle, addressing supporters late Tuesday, said she was “disappointed” but “not disheartened.” She also pledged to continue working for her constituents as president of the county board.

“This is clearly an historic night,” she said. “Not long ago two African American women vying for this position would have been unthinkable. While it may be true that we took different paths to get here, tonight is about the path forward.”

Why voters chose Lightfoot

On Tuesday, Monique Farren, 36, a teacher who voted for Lightfoot in the Albany Park neighborhood, said she would have been fine with either candidate, saying: “I feel like they’re both on the same page.”

Others saw it as a contest pitting experience against change, the establishment versus someone viewed as outside it. Supporters of Lightfoot viewed her as a person who could push for reforms. For Preckwinkle’s backers, her policies and background made her the choice.

“She knows the issues and has worked on them for years,” Claire Terrell, 51, a teacher, said while voting for Preckwinkle in the Rogers Park neighborhood. “We’ve seen what happens when you elect someone who has never held political office before. Experience matters now more than ever, even in this city.”

Lightfoot’s inexperience in elected office gave no pause to Cesar Diaz, 36, who handed out literature urging people to vote for Lightfoot, whom he supports even though the electricians union of which he is a member endorsed Preckwinkle.

“Even though she hasn’t had a chance to make policy decisions, I want to give her a chance to show who she can be,” he said of Lightfoot.

Julie Potratz, 33, a Chicago Public Schools teacher, voted after work for Preckwinkle because of her education background, but she said the fact that a black woman would win regardless “is wonderful, it’s really refreshing.”

Mike Klonsky, a retired teacher who voted in Logan Square, picked Lightfoot, noting that she got into the race before Emanuel’s announcement, unlike Preckwinkle and others who jumped in only after Emanuel dropped out. Klonsky also viewed her as a candidate who could take aim at the city’s political machine.

“I want to get rid of the remnants of the old Chicago machine and open up the door to change in this city,” said Klonsky, 75.

After making the runoff, Lightfoot went on to secure endorsements from several of those defeated contenders and picked up support from labor unions, state lawmakers and the city’s two major daily newspapers. Preckwinkle’s major endorsement came from the Chicago Teachers Union, which had turned comments Lightfoot made about letting the police utilize empty public school buildings against her. Preckwinkle’s supporters used that suggestion to push the idea that Lightfoot cannot be trusted on police reform issues, a key topic for many residents.

The complicated issue of policing in the city

The mayoral contest has played out amid lingering tensions over issues of violent crime and inequality. The next mayor will also have to deal with an ongoing effort to reform the police force, which in recent years was the subject of a Justice Department investigation that concluded with a scathing report saying officers routinely violate the rights of residents, particularly blacks and Latinos.

That federal investigation began after the city released video footage in 2015 showing a white officer shooting and killing Laquan McDonald, a black teenager, the previous year. The video set off intense protests and public anger. The officer, Jason Van Dyke, stood trial last year and was convicted of second-degree murder.

For Emanuel, who ran for mayor after years spent working in the White House, the controversy over McDonald and the police department lingered throughout his second term. Last fall, just a day before Van Dyke’s trial began, he made the stunning declaration that he would not seek another term.

Policing issues were prominent in the campaign to follow him. Lightfoot had been president of the Chicago Police Board, which rules on discipline cases, and chaired a police task force that Emanuel assembled after the McDonald video was released. The task force’s report criticized both the police department and its oversight system.

But Rep. Bobby L. Rush (D-Ill.), who endorsed Preckwinkle, lashed out at Lightfoot recently by saying, “If any young black male or female is killed by a police officer under a Lightfoot administration, then the blood would be on those voters’ hands who elected her.”

Lightfoot said Rush’s words were hateful rhetoric and asked Preckwinkle to denounce them. Preckwinkle declined to do so, saying that Rush, who has served in Congress for more than a quarter-century, is “a pillar in the civil rights movement in this city and is more than capable of speaking on his beliefs.”

Speaking to voters outside a subway stop in Logan Square not far from her home while ballots were being cast during the day on Tuesday, Lightfoot said she was “grateful and very hopeful.” She also framed her possible election as momentous for what it would mean in a city with such entrenched political forces.

“The historic part of this election is if we win, we beat the machine,” Lightfoot said. “That’s the real historic possibility of today.”

Berman reported from Washington. Kari Lydersen in Chicago contributed to this report.

The design of the Harriet Tubman $20 bill was advanced when Mnuchin announced the delay

The treasury secretary’s far-fetched explanation that more technical planning is needed is mere myth

At a campaign rally, Trump criticized Somali-born Rep. Ilhan Omar. The crowd responded by chanting, ‘Send her back!’

‘I am where I belong, at the people’s house and you’re just gonna have to deal!’ Omar responded on Twitter

A divided House votes to condemn Trump’s racist remarks

Only four Republicans backed the measure