Media playback is unsupported on your device Media caption New Chicago mayor's message on race, love... and height

Chicago made history on Tuesday by electing Lori Lightfoot, the city's first openly gay, black female mayor.

In a historic battle between two black female candidates, the 56-year-old Democrat defeated Toni Preckwinkle, a longtime Chicago politician who has led the local Democratic party.

Ms Lightfoot, a former federal prosecutor who has never held political office before, will replace Rahm Emanuel, former President Barack Obama's chief of staff and the city's mayor for nearly a decade.

Mr Obama, who once served in the Illinois state legislature, congratulated Ms Lightfoot.

Ms Lightfoot also carries the mantle of Harold Washington, the city's first black mayor who served from 1983 to his death in 1987. And with African Americans making up around 30% of the city's population, it's notable that Chicago hasn't seen a black mayor since the 1980s.

"She inspired hope, even optimism, but she'll face pressure to deliver, or risk disappointing the people who backed her," says Peter Slevin, a professor at Northwestern University's Medill School of Journalism and former Chicago bureau chief for the Washington Post.

"In Lightfoot, Chicago voters placed a big bet that a political outsider can do what a long line of professional politicians could not, and that's deliver a safer city with better schools and more investment in forgotten neighbourhoods."

But the job of leading the country's third largest city comes with its challenges. Here are some of the issues Ms Lightfoot will face when she takes office.

Corruption

A February report using Department of Justice data by the University of Illinois found that Chicago was the most corrupt US city, based on the number of corruption convictions from 1976 to 2017.

Over 30 city council members have been linked to corruption cases in that time. In January, the city's longest-serving alderman Edward Burke was charged with attempted extortion for allegedly trying to use his political position to drive business at his private law firm.

The 14th Ward Democrat, who has denied the allegations, won his re-election in February despite the charges.

His case, however, had a big impact on the mayoral race. Ms Preckwinkle's association with Mr Burke hindered her prospects, Lynn Sweet, the Chicago Sun-Times' Washington Bureau Chief, told the BBC.

"There is this unfolding corruption scandal that's taking place at the same time as the mayoral campaign, and that also has been a factor that has helped Lightfoot emerge from the crowded field."

Ms Sweet adds that this new mayor will need to foster productive relationships with a city council with many new members - including some new faces who "may feel emboldened, creating a new dynamic".

During a debate last month, Ms Lightfoot promised Chicagoans she would send the city's corrupt political machine "to its grave, once and for all".

Image copyright Reuters Image caption Supporters listen as the new mayor celebrates her win

Gun and gang violence

Despite strict gun laws within Illinois, Chicago's gun violence continues to make national headlines as weapons pour in from neighbouring states. The city's shootings have long been used by gun-rights advocates as proof that strict laws do not stop violence.

Chicago Police announced a 24% reduction in shootings so far this year, building on trends from 2018.

The department's report for 2018 saw a 15% drop in the number of murders - the biggest reduction of any major US city. Murders as a result of a shooting have declined 31% in the city since 2016, police said.

As a part of an initiative between police and Mayor Emanuel, in the last two years, the department has hired over 1,000 more officers, obtained new technology and opened new strategic decision support centres across the city.

But there's still a sense of frustration that Ms Lightfoot will need to address - particularly given her former role as head of Chicago's police board and accountability taskforce.

Media playback is unsupported on your device Media caption Life and death on the lost streets of Chicago

Police reform

"As the city's murder toll rose, an increasing number of Chicagoans, especially African Americans, lost faith in the police department," Prof Slevin says.

In 2014, the killing of Laquan McDonald, a black teenager, by a white police officer sparked nationwide outrage and protests of police brutality. The incident led to a federal investigation of the city's police that found a pattern of racial discrimination and use of excessive force by Chicago police.

This January, a federal judge approved a plan for dozens of reforms for Chicago's police force that was compiled by the city and the state attorney general, with input from the public and police. The areas of reform include officer training, crisis intervention, mental health and use-of-force policies, WBEZ reported.

"Lightfoot was prominent in calling for police reforms and now she'll have to find a way to follow through," Prof Slevin says. "She told voters that she wants police to work more closely with residents and to be held accountable when they break the rules."

While she chaired the Chicago Police Board, the civilian group fired around 75% of officers accused of misconduct - compared to 40% in prior years, according to the Chicago Tribune.

And in the wake of the Jussie Smollett alleged hoax case, the national eye has once again turned to Chicago's police and justice departments.

Ms Sweet says the new mayor will probably be tasked with helping move forward in a productive way from that case.

"The next big decision will be whether or not the current police Superintendent, Eddie Johnson, is kept on."

Image copyright The Washington Post via Getty Images Image caption Nearly half of Chicago's schools ranked as underperforming last year

Failing schools

In 2018, close to half of Chicago schools were underperforming by the state's new accountability system, according to the Illinois Report Card.

Of those, 40% were high schools, and nearly all of the underperforming schools were on the city's South Side, which is primarily populated by the African-American community, education news site Chalkbeat reported.

"Tens of thousands of black residents moved out of the city, in fact, to escape violence and substandard schools," Prof Slevin says.

But in fixing schools along with other aspects of Chicago's public services and infrastructure, Ms Lightfoot will have to work with a tight budget, he adds.

"She won't have much money to play with, given the city's budget deficit and its underfunded pensions."

And the mayor's office is still recovering from public backlash over the 2013 decision to shutter 50 public schools in predominantly African-American neighbourhoods - the largest school closure in the city's history.

Image copyright SAUL LOEB/Getty Images Image caption As mayor, Rahm Emanuel had a certain "star power" given his connection to former President Barack Obama

Public image

As the third largest US city, Chicago boasts global name recognition, but views of the Windy City are not always favourable, marred by associations with gun violence and corruption.

"One of the jobs of the mayor is to sell the city to the world," Ms Sweet says. "Chicago is going to lose star power with the departure of Rahm Emanuel."

Mr Emanuel, who was former President Barack Obama's first chief of staff, "has a larger than life personality" in addition to being a mainstay on national television, Ms Sweet notes.

"It remains to be seen whether the new mayor can add some pizzazz on their own to be able to sell - to continue to sell - Chicago to the nation and the world."

Chicago's voters have indicated they're ready for big changes.

Moving forward now, Ms Sweet says: "The challenge of the new mayor is to unite the city behind her."