ENCINITAS — Catherine Blakespear flashed a brilliant smile and threw her arms up in celebration as she stared at the first election results on a laptop computer screen.

By a little after 8 p.m. the current councilwoman knew that Encinitas voters had chosen her as their mayor-elect over Paul Gaspar by a two-to-one margin. The crowd surrounding her at her election-day party erupted in cheers.

Blakespear defeated Gaspar, the CEO of a mid-size physical therapy chain and husband of current Mayor Kristin Gaspar, by a margin of 67.2 percent to 32.8 percent of the more than 17,000 votes cast.

“I’m ecstatic and hugely relieved,” Blakespear said. “This is what I expected, but you never know in local elections. I think it shows the power of grassroots campaigning.”

She was not alone in her celebration, as current Councilman Tony Kranz and Planning Commissioner Tasha Boerner Horvath, who also attended the gathering, clinched two of the three seats up for grabs in the City Council race.

Both Kranz and Boerner Horvath echoed Blakespear’s elation with the early results.

“Ultimately all politics is local, and I am honored that the voters have given me the opportunity to continue to do the good works we have accomplished the last four years,” Kranz said.

Control of the council majority was at stake in this election, as four of the five seats were up for re-election due to the 2012 vote to make the mayor a two-year elected post.

The mayor race and council race had drawn parallels to the national election due to its sometimes acrimonious tone and partisan division between the candidates.

Blakspear, Kranz and Boerner Horvath were endorsed by the Democratic Party while Gaspar, Muir and Phil Graham were backed by the Republican Party. Brandenburg, who did not have the backing of either political party, was the lone candidate to oppose the city’s proposed housing element initiative, Measure T, which voters defeated on Tuesday.

The mayor’s race in particular was highlighted by a debate over the candidate’s visions, goals and campaign. Gaspar argued through the campaign that Blakespear and the council majority of her, Kranz and current Councilwoman Lisa Shaffer had imposed their vision upon residents without considering the public’s input, pointing to the Cardiff Rail Trail vote and the purchase of Pacific View as examples.

He also argued that the current majority’s decisions had led to the waste of taxpayers’ dollars.

Gaspar has not responded to calls for comment.

Blakespear, for her part, had argued that Gaspar lacked a vision of his own and also did not have the experience to lead the city as mayor.

Several voters interviewed Tuesday said they chose Blakespear over Gaspar because of her stance on environmental issues, which she made a pillar of her campaign.

Others said they voted against Gaspar because they felt it was stepping into his wife’s role without the requisite experience.

The races were also noteworthy for the large amount of money raised and spent. If you include outside political action committees, more than $250,000 poured into the election. Blakespear raised the most with over $56,000 and Graham raised the second largest amount with nearly $42,000.

But Boerner Horvath said she believed the race hinged on grassroots campaigning, including walking precincts and engaging with residents.

“Since there’s no polling in local elections, it’s really unpredictable; I could’ve been in last place, so you just run the best ground game possible,” Boerner Horvath said. “I am humbled by the support from all five communities.”

Blakespear’s election to the mayoral position creates a vacancy on the City Council, which the new council could choose to fill with an appointment or by calling for a special election.

Brandenburg, who finished 1,200 votes behind Muir, said he would be open to being appointed to the position.

“The city shouldn’t waste money on a special election, and I would be happy to take the position, I would surely consider it,” Brandenburg said. “I wish all of the candidates the best. For better or for worse, the people have spoken and you have to move on.”