Cherelle Parker’s win in the Democratic primary is a sign of how the city has changed. But Philadelphia’s challenges remain deep and daunting.PHILADELPHIA — The afternoon before Election Day, Jennifer Robinson, 41, was trying to manage her two small children in the quiet corner of a public library in a pocket of her city that had endured generations of abandonment. She was despondent about the state of Philadelphia, most of all about the crime, but she talked about the mayoral primary as if it had little bearing on any of it.“Nobody has any answers,” Ms. Robinson said, shifting her restless 11-month-old from arm to arm. “It’s a feeling of hopelessness.”This is the city that Cherelle Parker will be leading as mayor if she wins the general election in November, and these are the sentiments she will be trying to turn around. On Tuesday, Ms. Parker, a former state legislator and City Council member, secured a surprisingly decisive victory in a Democratic primary that had been seen as a tight five-way race up until Election Day.The huge number of undecideds in the last polls appear to have broken heavily for Ms. Parker, 50, the only Black candidate of the five main contenders hoping to lead a city where Black people make up more than 40 percent of the population and where the Black neighborhoods have been especially hard hit by gun violence and Covid.If she wins the general election, which she is favored to do given that registered Democrats outnumber Republicans in Philadelphia more than seven to one, Ms. Parker will be the first woman in a line of 100 mayors.That list of men goes back centuries, before the city had established itself as the cradle of American independence, and long before President Biden came to Independence Hall last September to warn the nation about threats to democracy.For Philadelphia, Ms. Parker’s primary victory is a sign of how the city has changed in just the last half-century. For most of the 1970s, the mayor was Frank Rizzo, a former police commissioner who embraced brutal police tactics, particularly toward Black Philadelphians. But the city’s challenges remain deep and daunting.At least a half dozen Philadelphia public schools have been shut down because of asbestos contamination, a predictable debacle in a city where the average age of public school buildings is over 70 years. Housing costs are out of the reach for many residents. There is a city staffing shortage, with thousands of municipal positions unfilled. Hundreds of Philadelphians have died in recent years from opioid overdoses.Jennifer Robinson has become increasingly frustrated with local politicians over the last few years and doubts that any candidates for mayor can make a difference.Rachel Wisniewski for The New York TimesLooming over all of this are the killings. Rates of gun violence have risen in cities large and small across the country, but they have been particularly severe in Philadelphia, a city of 1.6 million, nearly a quarter of whom live in poverty. More than 500 people were killed in each of the past two years, the highest annual tolls for the city on record, and many hundreds more have been injured by gunfire. The number of shootings and homicides has declined this year, but the city is awash in guns; Republican legislators have tried to remove the district attorney over the enforcement of gun laws, while city officials have sued Republican legislators for limiting their ability to enact stricter ones.Philadelphians are virtually unanimous in their alarm about the violence but have been less unified about the solutions. Larry Krasner, the progressive district attorney who has insisted that the city cannot simply arrest its way out of the crisis, was re-elected by an overwhelming margin in 2021, with some of his strongest showings in the neighborhoods most scarred by violence.On Tuesday, many of those same neighborhoods voted for Ms. Parker, who pledged to hire hundreds more police officers and bring back what she called “constitutional” stop-and-frisk.“People are not feeling safe, they’re feeling that a sense of lawlessness is being allowed to prevail,” she said in an interview shortly before she launched her mayoral campaign. “We can’t ignore that.”These proposals have faced strong pushback and skepticism about the ability to hire hundreds of officers at a time when police departments nationwide have struggled with recruiting.Her Republican opponent in the November general election is David Oh, also a former City Council member.Ms. Parker hugged supporters at a polling site during the primary election on Tuesday.Rachel Wisniewski for The New York TimesIn the Democratic primary, Ms. Parker’s pitch to voters was that she understood firsthand what their lives were like, as a Philadelphia native, as a Black woman who was the daughter of a teenage mother and as the mother of a Black son.This appeal has created lofty hopes among Black voters, said Carl Day, a pastor who leads the Culture Changing Christians Worship Center in one of the poorest and most violent areas of the city. “The expectation is definitely there from the Black community that she knows what we’re going through and so she will definitely bring about change,” he said.Still, he said, these hopes appeared to be mostly held by older Black voters, who were also more likely to embrace Parker’s agenda, including her push for more policing.Younger Black Philadelphians, Pastor Day said, were more skeptical of Ms. Parker and even worried about some of her policing plans. Already, Pastor Day said, he had seen younger people online wondering what this means, and saying that nothing was going to change. There is a seeming contradiction here: that a city deeply unhappy with the way things are going just voted for a candidate who was endorsed by dozens of sitting lawmakers, City Council members and ward leaders — even the current mayor, Jim Kenney, a term-limited Democrat who has become highly unpopular, said he voted for her.Isaiah Thomas, who won an at-large City Council seat on Tuesday, said that even with that support, it was not fair to call her the establishment candidate — most of her opponents had their own networks of connections. But he said the breadth of her support, including trade unions and lawmakers, showed that she knew how to build, and maintain, coalitions.“She’s a worker,” said Mr. Thomas, who joined the Council in 2020 and worked alongside Ms. Parker managing its response to the crises of the last three years. “She understands government, she understands the budget.”Carl Day, a pastor, said older Black voters were more likely than younger Black voters to embrace Parker’s agenda, including her push for more policing.Rachel Wisniewski for The New York TimesIn state government, any Democratic mayor would find a more willing partner than his or her immediate predecessors. Last November, Democrats won control of the Pennsylvania House for the first time in a dozen years, a majority that was reconfirmed after a special election on Tuesday night. The current House Speaker, Joanna McClinton, represents part of Philadelphia, as does the chairman of the House Appropriations Committee. The new governor, Josh Shapiro, and the majority of the Democratic caucus in the State Senate are from the region.“There’s reason to be more optimistic about Harrisburg’s relationship with Philadelphia than there has been in many years,” said State Senator Nikil Saval, a Democrat, who endorsed one of Ms. Parker’s opponents in the race but praised some of her accomplishments on the City Council, such as a program she helped create that offered low-interest loans to homeowners.Still, in interviews in Philadelphia this week, voters and local politicians alike said that the most urgent task of the new mayor would be to give the city a jolt of optimism. For many in the city’s poor and working-class neighborhoods, that might start with the attention of someone who has seen up close their daily struggles. But, people insisted, hope would stick only if there were tangible results.“I haven’t seen anyone help; it’s just getting worse,” said Ms. Robinson, the mother in the library. “For me to vote for someone, I’d have to see difference.” More