State Sen. Catherine Pugh on the campaign trail in Baltimore. She won the crucial Democratic primary on Tuesday. (Barbara Haddock Taylor/Baltimore Sun)

Catherine E. Pugh, a state senator from the West Baltimore neighborhoods that were rocked by riots a year ago, claimed victory Tuesday night in this city’s crucial Democratic mayoral primary over former mayor Sheila Dixon after a tense campaign.

In heavily Democratic Baltimore, Pugh is virtually assured of becoming the city’s third consecutive African American female mayor at a time of continuing racial tension, spiking crime and economic malaise. She made an appeal to the disenfranchised central to her campaign.

“Nobody gave this campaign a chance,” Pugh said to cheering supporters at a downtown hotel. “But I am the Democratic nominee. As we campaigned from one end of the city to the other, my message is about inclusion, my message is about lifting the least of us while we lift all of us.”

Pugh, 66, took the stage even before her closest rival, Dixon, conceded the race. Pugh led the crowded field of 13 contenders with 37 percent of the vote to Dixon’s 34 percent. A record turnout during early voting proved crucial to Pugh’s success.

Dixon spoke to her disappointed supporters at a sports bar near the Inner Harbor.

“Now it’s time to open up a new chapter in this city,” she declared. Her son and daughter stood by her with tears in their eyes. “We need to build on what this campaign stood for. It stood for love of this city, it stood for pride. . . . I’m not through yet. We will make a difference.”

Dixon, who was forced to resign in 2010 following a corruption scandal, mounted a determined comeback bid and had led the race earlier in the year. But the most recent polls showed her trailing Pugh, a three-term state senator.

In the Republican primary, former radio broadcaster Alan Walden easily prevailed over four rivals.

The election results were slowed Tuesday night by a judge’s decision to extend voting at four polling places by an hour, until 9 p.m., because of delays in opening the locations that morning.

Omar Grimes, 27, voted in the city’s Sandtown-Winchester neighborhood, epicenter of the riots that rocked the city after the fatal injury of Freddie Gray in police custody last year. He cast his ballot for Pugh.

“I just want fresh eyes,” said Grimes, who works in battery manufacturing. “I felt like Dixon had her chance, and she made mistakes. And I forgave her, but I don’t forget.”

Joyce Mitchell, a 69-year-old retiree, said she was struck by Pugh’s response to the riots when she appeared on street corners with a bullhorn and urged the young men to clear the streets. “When the uprising happened last year,” she said, “Pugh was going around here front and center and showing how much she cared.”

But many waiting to vote at Gilmor Elementary School were ready to give Dixon another chance. Some said they considered her a hometown favorite because she was raised in West Baltimore and remains connected to the community.

Dixon resigned after being convicted in connection with misappropriating gift cards intended for needy families. As part of a plea deal, she stepped down, paid $45,000 to charity and performed 500 hours of community service.

She was just one of a flood of hopefuls to jump into the race after Mayor Stephanie Rawlings-Blake (D) announced in September that she would not run for another term. The incumbent’s popularity had plummeted after what was widely perceived as a faltering response to the riots.

DeRay Mckesson , a leader of the Black Lives Matter movement, returned to his native Baltimore and filed to run on the last day of eligibility. His campaign never gained traction, and he finished with under 3 percent of the vote. City Council member Nick Mosby entered, only to drop out and endorse Pugh a few weeks before the primary.

But the contest eventually resolved into a battle between Pugh and Dixon. The final weeks became a slugfest of ethical charges and counter­charges. A super PAC, Clean Slate, produced a brochure with a facsimile mug shot of Dixon. Pugh was accused of a form of vote-buying when her campaign served meals to potential volunteers and then bused them straight to early-voting stations.

Additionally, Pugh’s fundraising came under question when records showed that several checks for the maximum-allowed donation had been made out with incorrect names or by nonexistent business entities. She was criticized for accepting donations for her mayoral campaign from lobbyists with business before her state Senate committee.

Pugh’s campaign denied wrongdoing in each case.

Anne Parshall, 61, voted for Pugh at St. David’s Church in the city’s Roland Park neighborhood.

“For me, it was anybody but Sheila,” said Parshall, a teacher. “The corruption thing was just too much for me.”