Former federal prosecutor Lori Lightfoot defeated Toni Preckwinkle in a runoff for Chicago mayor Tuesday. She will be the first openly gay person and first black woman to lead the city.

The Associated Press called the race for Lightfoot shortly before 8 p.m. local time.

With over 91 percent of precincts in, Lightfoot led Preckwinkle 73.7 percent to 26.3 percent, according to the Chicago board of elections website.

Lightfoot pumped her fist in the air and the crowd cheered when she said, “Thank you Chicago!”

“In this election Toni and I were competitors, but our differences are nothing compared to what we can achieve together,” Lightfoot said. “Now that it’s over, I know we will work together for the city that we both love.”

"Today, you did more than make history," Lightfoot said. "You created a movement for change."

Lori Lightfoot supporters react as she is projected Chicago's next mayor at an election night party. Kamil Krzaczynski / AFP - Getty Images

Lightfoot, 56, who was an assistant U.S. attorney before she entered private practice, has never held elective office before.

The runoff election was bound to be historic, as either of the two candidates was going to be Chicago’s first black female mayor. The city is around 33 percent black, according to 2010 Census data.

Preckwinkle told supporters Tuesday evening that she called Lightfoot to congratulate her.

"This may not be the outcome we wanted, but while I may be disappointed, I'm not disheartened," she said. "For one thing, this is clearly a historic night. Not long ago, two African-American women vying for this position would have been unthinkable."

Lightfoot came in first in the February election that saw a record 14 candidates vying to succeed Mayor Rahm Emanuel, who did not seek re-election.

Preckwinkle, 72, a former schoolteacher who served on the Chicago City Council for 19 years before becoming Cook County Board president in 2011, came in second in the February race, garnering 16.1 percent of the vote to Lightfoot's 17.5 percent.

They both beat William "Bill" Daley of the famous political family, whose father and brother each served as mayor for a combined total of more than 40 years.

Daley, who came in third with 14.8 percent of the vote, conceded that night and congratulated both women, saying "one of them will have the honor of being the next mayor of Chicago."

Emanuel, who has been mayor since 2011, announced in September that he would not seek a third term.

Although a nonpartisan election, the candidates in the February election like Tuesday's runoff were all attached in varying degrees to the Democratic Party. The Republican Party has virtually disappeared from the city.

Lightfoot seized on the outrage over the 2014 shooting of Laquan McDonald by a white police officer to launch her reformer campaign and suggested that Preckwinkle was attached to big-party politics.

Download the NBC News mobile app for breaking news alerts.

Lightfoot said that as mayor, she would focus on investing in neighborhoods on the West and South Sides and bring transparency and accountability to City Hall. She also said she also wants to end City Hall corruption and restore people's faith in government.

Preckwinkle, who leads Cook County’s Democratic Party, said that mayor “is not an entry-level job” and that “it's easy to talk about change. It's hard to actually do it.”

Both women expressed support for a casino in downtown Chicago, and for changing the state's income tax system to a graduated tax, in which higher earners are taxed at a higher rate.

Voters fill out their ballot at a polling place during a runoff election for mayoral candidates Toni Preckwinkle and Lori Lightfoot in Chicago, Illinois on April 2, 2019. Joshua Lott / Reuters

There were few Election Day problems, NBC Chicago reported. One precinct opened "exceptionally late" because of a delay caused by judges not showing up on time, but the board of elections said that it appeared all voters would be able to return by the close of polls, according to the station.

Lightfoot was endorsed by the Chicago Sun-Times and Chicago Tribune newspapers, as well as U.S. Reps. Jesus “Chuy” Garcia and Robin Kelly, according to NBC Chicago.

Preckwinkle had the endorsement of several unions, including the Service Employees International Union state council, the Teamsters joint council and the Local 700 and other unions, as well as U.S. Reps. Jan Schakowsky, Bobby Rush and Danny Davis, NBC Chicago reported. Chance the Rapper also endorsed her.