ROCHESTER — Incumbent Lovely Warren has won the Democratic primary race for Rochester mayor.

Four years ago, the mayor surprised everyone with an upset of then Mayor Tom Richards in the 2013 primary. Tuesday night, she easily survived a challenge from former police chief James Sheppard and former television journalist Rachel Barnhart.

At Warren's campaign headquarters, the crowd was excited for the mayor's big win.

Speaking to supporters, the mayor said the race wasn't easy, but her campaign was able to gut it out.

"Our prospects in this election weren't always that good," Warren said. "We were the underdog through the committee process, but we persevered. Our opponents distorted our record and challenged our successes, but we believed."

Many thought former Rochester Police Chief James Sheppard had the name recognition to make this a competitive race. But in the end, he was unable to pry support from Warren's base.

While Sheppard is on Working Families and Independence party lines, he says his campaign is finished.

"I know everyone wants to talk about what comes up in November," Sheppard said. "My mind is set. ... This is really what it's about, winning the primary and that did not happen. So, as far as my run for mayor, it is done."

Sheppard still holds a seat in the Monroe County Legislature.

Barnhart said she had prepared herself for Tuesday's result. But, she said, she is pleased with her performance, adding that she was able to compete closely with Sheppard, despite having fewer funds in her war chest.

"A three-way race is very hard," she said. "I was the underfunded candidate. I was always the candidate who was going to have an uphill battle."

When asked if experience was an issue in the race, Barnhart responded, "Well then, what was James Sheppard's excuse? I was right there with him. So clearly experience was not an issue."

As for the Rochester City Council, 13 people were on the ballot for five Democratic spots. On Tuesday, Loretta Scott, Malik Evans, Willie Lightfoot, Jackie Ortiz and Mitch Gruber were able to win those seats.

On the school board, Van White, Cynthia Elliott and Natalie Sheppard filled three spots.

In unofficial results from other area primary elections (all are Republican primaries unless otherwise noted):

Wayne County

Macedon town board (two seats): Bruce Babcock, 116 (43 percent); David McEwen, 84 (31 percent); David Nelson, 68 (25 percent)

Savannah highway superintendent: Mark Fedele, 75 (50 percent); Randy Brown, 47 (32 percent); John King, 27 (18 percent)

Sodus town justice: Thomas Putnam, 247 (56 percent); William Kallusch, 198 (44 percent)

Sodus town board (two seats): Donald Ross, 260 (42 percent); David Leroy, 217 (35 percent); Kelley Allen, 143 (23 percent)

Sodus Point village mayor: David McDowell, 85 (59 percent); Christian Tertinek, 58 (41 percent)

Wolcott town board (two seats): Zachary Decker, 88 (52 percent); Lori Furguson, 50 (29 percent); Christopher Loveless, 32 (19 percent)

Yates County

County Legislature District 1 (four seats): Edward Bronson, 238 (24 percent); Douglas Paddock, 236 (24 percent); Timothy Cutler, 222 (23 percent); Elden Morrison, 149 (15 percent); Patrick Killen, 137 (14 percent)

County Legislature District 2 (two seats): Timothy Dennis, 135 (29 percent); Richard Wilson, 130 (28 percent); Terry Button, 102 (22 percent); James Smith, 98 (21 percent)

County Legislature District 3 (four seats): Leslie Church, 157 (22 percent); Carlie Chilson, 148 (21 percent); P. Earle Gleason, 147 (20 percent); Daniel Banach, 143 (20 percent); Mark Morris, 126 (17 percent)