Concerns over public safety and pandemic restrictions helped some Republicans win seats on the New York City Council, which will also be one of the city’s most diverse councils ever.Election Day was expected to be something of a historic moment for the New York City Council. The city’s legislative body was poised to welcome its first South Asian members, its first Korean American members, its first Muslim woman and its first out L.G.B.T.Q. Black women. For the first time, it would have more women than men.Most of that did happen on Tuesday, but not exactly in the way that was anticipated. At least two of the women newly elected to the Council were Republicans — part of a trend that saw the party unexpectedly gain seats for the first time since 2009.Though Democrats cruised to victories in the vast majority of races, Republicans defended the three City Council seats they held, including one that Democrats sought to flip. They also picked up a fourth and remained competitive in three other races that, with some ballots yet to be counted, remained too close to call on Wednesday night.Even in two races where incumbent Democrats were running for re-election on multiple party lines, they received more votes on the Republican ballot line than the Democratic one.The results reveal the extent to which Republicans were able to garner support in more moderate and conservative districts by focusing on a few salient issues — a dynamic that was also at play in races nationwide.Elected officials and strategists from both parties said that the competitive Council contests were largely shaped by similar issues: concern over public safety, frustration over pandemic-related guidelines including vaccine mandates, and alienation from a Democratic Party that some voters worry has left them behind as the left wing has ascended.“There is a lack of a clear message of what the Democratic Party stands for,” said Ken Sherrill, a professor emeritus of political science at Hunter College.Councilman Justin Brannan, a potential contender for Council speaker next year, was in a close race against his Republican rival, Brian Fox.Holly Pickett for The New York TimesOthers said that low turnout had likely been a factor, and that Democrats had to do more to draw voters to the polls.“We can’t take our electorate for granted and just assume that because we’re in a blue state that all voters will follow us,” said Sochie Nnaemeka, the New York State director of the left-leaning Working Families Party. “We have to always be fighting.”Still, the broader contours of the next City Council remain unchanged from expectations. As it has been for decades, the 51-member body will be dominated by Democrats, many of them new faces from the party’s left wing. The city is poised to have one of the most diverse councils in its history, with at least 30 women holding office.The showing from Republicans is unlikely to alter the city’s immediate political direction. If Republicans picked up the final three races, they would have seven seats — their largest faction since the mid-1990s, but likely not enough to pose a major threat to Democratic priorities. Eric Adams, the Democratic candidate, handily won his election for mayor, and four of the five borough presidents will also remain Democrats, with Staten Island, a conservative stronghold, the exception.Among the still undecided races was a re-election bid by Councilman Justin Brannan, a Democrat who is a contender to become City Council speaker next year and whose Brooklyn district includes Bay Ridge, Dyker Heights, Bensonhurst and Bath Beach. On Tuesday night, he was 255 votes behind his opponent, Brian Fox, though at least 1,456 returned absentee ballots, about 1,000 from registered Democrats, have yet to be counted.In an interview on Wednesday afternoon, Mr. Brannan said that he believed that low turnout — about 24,000 people voted in person and 3,300 requested absentee ballots in a district where 105,000 are registered — was a factor in the tight margin of his race.But he also said the close race was demonstrative of the headwinds that Democrats had faced nationally and accused his opponent of trying to “harness these national culture wars” over hot-button issues like policing and vaccine mandates.During the campaign, Mr. Fox staunchly opposed vaccine mandates. His campaign also seized on the slogan “Justin Brannan defunded the police,” a reference to the budget negotiations last year in which city officials agreed to shift roughly $1 billion from the Police Department. Most council members, including Mr. Brannan, voted for that budget. He also voted for this year’s budget, which added $200 million back to the police budget.In Bay Ridge on Wednesday, Evan Chacker, 49, who owns an online education business, pointed to Mr. Brannan’s vote as a principal reason that the councilman lost his support.“We have law enforcement in the family,” he said. “He voted to defund the police.”In the Bay Ridge neighborhood of Brooklyn, the “defund the police” movement drove some voters away from Democratic candidates like Councilman Justin Brannan.Anna Watts for The New York TimesVincent Dardanello, the owner of a Sicilian cafe called Amuni, said that taxes and public safety were top issues for him, and that he had voted for Mr. Fox out of party loyalty, even though he knew and liked Mr. Brannan.“I’m a Republican, pretty much straight through,” Mr. Dardanello, 45, said.The debates were similar in other districts where Republicans won or exhibited strong showings, including in District 32 in Queens, the last Republican-controlled seat in that borough.During the campaign, which attracted spending from outside groups, Joann Ariola, the head of the Queens Republican Party, touted her support for the police, her commitment to protecting and improving the city schools’ gifted and talented program, and her focus on quality-of-life issues.Her Democratic opponent, Felicia Singh, a former teacher backed by left-leaning groups, kept her focus on education, the environment and the need for resources for often-underserved communities. Ms. Ariola, who sought to portray Ms. Singh as too left wing, won easily, by thousands of votes.Joann Ariola won her bid for a open Council seat in southeast Queens, in a race to replace the departing Republican, Eric Ulrich.Jackie Molloy for The New York TimesThe race to fill the seat in District 48 in southern Brooklyn, home to many Orthodox Jews and Russian and Ukrainian immigrants, reflected some changing political winds in parts of the city.Voters in the district have gradually shifted to the right, and the area favored former President Donald J. Trump in 2020. Inna Vernikov, a lawyer who decried vaccine mandates and to whom Donald Trump Jr. lent support, defeated Steven Saperstein there, giving Republicans a fourth seat on the Council.Races remained close in District 19 in Queens, where Vickie Paladino, a Republican community activist, leads Tony Avella, a former Democratic state senator and councilman. The Democratic candidate in District 47 in Brooklyn, Ari Kagan, was ahead of his Republican opponent, Mark Szuszkiewicz, by just 283 votes. Many absentee votes remain outstanding in both races.The winners of those races will join a City Council stuffed with Democrats who won easy victories in their races. Among them are five Asian Americans, the most in the body’s history, including Julie Won and Linda Lee in Queens, who are the Council’s first Korean American members; Shahana Hanif in Brooklyn and Shekar Krishnan in Queens, the first South Asian members; and Sandra Ung in Queens, who is Cambodian American. Ms. Hanif will also be the first Muslim woman to serve on the Council.The incoming council members come from across the liberal spectrum. They include moderate incumbents like Francisco Moya, as well as a number of former left-wing activists with no previous ties to City Hall like Tiffany Cabán and Kristin Richardson Jordan, an activist who, with Crystal Hudson, is one of the first two Black L.G.B.T.Q. women on the Council.Kristin Richardson Jordan will become one of the first two Black L.G.B.T.Q. women on the City Council. Rainmaker Photos/MediaPunch/IPX, via Associated PressMs. Jordan, who narrowly won victory in her primary, said on Wednesday that her win reflected the priorities of voters in her Upper Manhattan district: affordable housing, criminal justice reform and equality in education. Those differ from the chief concerns stated by voters in districts where Republicans were more competitive.Christina Greer, a political scientist at Fordham University, said that as a whole, the Council results highlighted what has long been true: that while conservatives have been muted in the city’s political discourse, they have always been something of a force.Ms. Greer also said that the results illustrated the difficulty of characterizing the city’s electorate in broad strokes.“We have to recognize that there’s several shades of blue in New York City,” she said.Julianne McShane More