CHICAGO — Mayor Rahm Emanuel’s decision not to seek a third term has given this city something it has never seen in its 181-year history: an election dominated by women of color.

A record 21 people — mostly Democrats — filed petitions to succeed Emanuel, though some have since dropped from the ballot. Among the top-tier candidates in the Feb. 26 election are five women of color, including the two front-runners: Cook County Board President Toni Preckwinkle and Illinois Comptroller Susana Mendoza.

Preckwinkle, a former alderman, is the first black person to chair the Cook County Democratic Party and the first woman to head the county board. Mendoza, the daughter of Mexican immigrants, grew up in Little Village, a primarily Hispanic neighborhood besieged by gangs, an experience that she says gave her a close-up view of the city’s gun violence problem.

Both candidates have made addressing street violence central to their platforms, an issue that has sparked multiple protests during Emanuel’s two terms in office.

“People in Chicago are looking for candidates with new voices and fresh perspectives who might be doing things differently than what was done before,” said Debbie Walsh, director of Rutgers University’s Center for American Women in Politics. “Clearly the narrative with Rahm Emanuel is that he has been out of touch and not connecting with these communities. A woman mayor of color could really be that kind of change people are looking for.”

The wave of female candidates in Chicago mirrors the November midterms, in which a record number of women, spurred by a sense that political leaders are mishandling issues important to them, ran for Congress.

In Chicago, tensions have boiled over between communities of color and Emanuel, who is white, over his perceived favor for downtown development at the expense of the historically marginalized neighborhoods on the South Side and West Side. An epidemic of gun violence, an unprecedented number of school closings and an ongoing police reform crisis galvanized a protest movement that has put Emanuel on continual defense.

Maze Jackson, the morning host of WVON, a news radio station focused on Chicago’s black community, said the potential for a black or Hispanic woman running Chicago would be “game-changing,” which is why he predicts the run-up to the February election is going to get ugly.

“This thing is going to get so tribal,” he said. “This will be an exciting time in Chicago.”

Gender and racial allegiances have become central in the heated election. When Preckwinkle challenged the legality of other candidates’ petitions earlier this month — a common move in Chicago’s mayoral elections — Mendoza accused her of being anti-woman. Five of the petitions that Preckwinkle contested were for female candidates.

“It’s shameful that the chair of the Cook County Democratic Party, the highest-ranking woman in county government, in the Year of the Woman and the age of Trump, would try to silence the voices of five women of color,” Mendoza said in a statement.

Preckwinkle dropped the challenge two days later.

After opponents criticized her for receiving campaign donations from Ed Burke, a longtime City Council member whose offices were recently raided by the FBI, Preckwinkle announced plans to hand over the $12,800 in donations to two Latino organizations.

Mendoza gave her $10,326 in Burke donations to the families of three Chicago police officers who were killed in the line of duty.

Chicago voters broke the glass ceiling for women in 1979, when Jane Byrne was elected the first female mayor of a major city in the country. Byrne, who was white, endured sexist remarks and attitudes from all sides, said her daughter Kathy Byrne, a Chicago attorney.

Her victory “was quite a shock to the establishment,” said Kathy Byrne, who co-chairs Mendoza’s campaign. “It was article after article about her hairstyle and her clothes. She’d be at City Hall until three in the morning working on preventing a schoolteacher strike, but the next day, all they would say was how she had gray circles under her eyes.”

Byrne lost her bid for a second term in 1983, and Chicago has not had a female mayor since. But nationwide, the number of female mayors has been increasing, according to data from the Center for American Women and Politics. As of August, 23 of the 100 largest cities in the country were led by women, 10 of them by women of color: seven blacks, one Latina, and two Asian Pacific Islanders. That’s an increase from two years ago, when 19 of those cities were led by women.

In addition to Mendoza and Preckwinkle, three other women of color are among the top-tier candidates in Chicago: former federal prosecutor Lori Lightfoot, community activist Amara Enyia and Cook County Circuit Court Clerk Dorothy Brown. They are in a field that includes Bill Daley, son of former mayor Richard J. Daley and also White House chief of staff under President Barack Obama; former Chicago Public Schools chief executive Paul Vallas; and former Chicago Police superintendent Garry McCarthy.

A poll conducted for the Chicago Federation of Labor this month showed Preckwinkle and Mendoza leading the field with 21 percent and 16 percent support, respectively. Chicago’s election rules demand that the winner receive more than 50 percent of the vote, meaning a runoff is likely.

Mendoza and Preckwinkle have ties to the city’s political establishment: Preckwinkle as a five-term alderman who now leads the county’s Democratic Party and Mendoza serving in various elective positions for nearly two decades. They have bashed each other as establishment hacks who are attached to the political machine responsible for ushering most of Chicago’s male mayors to the executive office for decades.

But Becky Carroll, a Chicago political consultant, said the time is ripe for a more diverse pool of candidates because “the traditional machine politics don’t exist in the same way that it once did, where you had to know someone who knew someone to get in line for running.”

Both candidates’ platforms tout their ties to the city’s minority communities. Preckwinkle has promised to address the street-violence problem holistically, providing more “compassionate policing,” affordable housing and social services. She blasted Emanuel’s decision to slash mental health clinics early in his tenure as a “shortsighted” cost-saving measure.

“People who don’t have access to mental health services end up in the county hospital, in the emergency room or in jail because they acted out,” she said in an interview with The Washington Post.

Mendoza also believes that dealing with the violence will require a suite of answers. She wants to increase the number of detectives, turn underused schools into community centers and expand mentoring and job training programs.

She distances herself from Emanuel, stressing that her position as city clerk during his administration was an elective one, and that she often clashed with the mayor during his first term. She said she refused his 2011 directive to raise the cost of city vehicle stickers by $60 each and got him to agree to a $10 increase.

“I’m not the establishment,” she said. “I’m someone who came from no political pedigree and worked hard to build relationships . . . I’m really proud of that.”

It signals a possible shift in the allegiances of Chicago’s electorate. In the 2015 election, Emanuel received more support in majority-black areas than millionaire Willie Wilson, who is black, and Jesus “Chuy” Garcia, who is Hispanic. During a runoff with Garcia, Emanuel won in majority-black precincts by 57 percent, according to a post-race analysis by the Illinois Campaign for Political Reform. (Garcia won the much smaller Hispanic vote.)

Other women of color in the mayoral race have positioned themselves as outsiders with no allegiance to establishment politics.

Lightfoot criticized her competitors’ early silence on the FBI raids on Burke’s offices, saying that their lack of response reflected the false choice voters have with Preckwinkle and Mendoza.

“It speaks to a broken political machine and status of the status quo,” she said.

When Preckwinkle withdrew her challenge to Lightfoot’s petitions last week, Lightfoot used the opportunity to emphasize her outsider status.

“We beat the machine,” she said, “and we made history, too. I’m proud to be the first LGBTQ+ person ever to make the ballot for mayor of Chicago.”

Enyia said her work as a community organizer in the embattled West Side neighborhoods of Austin and Garfield Park, where she lives, gives her a real-world understanding of the streets. At 35, she is the youngest of the female candidates, and her solutions to address city problems are unconventional, including establishing a public bank to generate revenue for the city. Her campaign also has a jolt of millennial energy with the endorsements of Chance the Rapper and Kanye West, both from Chicago.

She compares her candidacy to those of outsiders such as Stacey Abrams, who narrowly lost the governorship of Georgia in November, and Ayanna Pressley, who became the first black woman elected to Congress from Massachusetts last month.

“We definitely connect with that movement,” she said. “The links that connect all of us is we are not viewed as the same old.”

This story has been updated.