State Sen. Will Brownsberger — the state Senate’s third-ranking member — is all but certain to retain his legislative post for another term. His Democratic primary challenger, Daniel Lander, conceded the race to represent parts of Boston, Watertown, Cambridge and Belmont following a recount Thursday.

“I’m looking forward to continued service to all the people of my district and I am eager to get back to work,” Brownsberger told GBH News in a text Thursday.

Lander congratulated Brownsberger on his victory in a statement Thursday.

Support for GBH is provided by:

“I want to thank every election worker and volunteer who made sure every single vote was counted in this election,” Lander said. “While this race did not end as we’d hoped, I am so deeply proud of the campaign we built. I know we have woken up the State Senate and sent a message loud and clear that the days of delay and inaction must end now.

“This race has already shaken up the broken status quo,” he added. “Together, we sent a message to State Senate Leadership that Beacon Hill has to work harder and do more.”

With no Republican challenger on the ballot, Brownsberger is all but guaranteed to retain his Suffolk and Middlesex district seat in the November general election.

Both candidates petitioned for a recount after the initial tallies last week showed Brownsberger ahead by 34 votes, 12,291 to 12,257, according to the secretary of state’s office. The recount added one vote to Brownsberger’s lead, setting it at 35 votes.

Senate President Karen Spilka congratulated primary winners in a statement Thursday, singling out two Boston-area senators who survived challengers backed by Boston Mayor Michelle Wu.

“I want to particularly congratulate Senators Will Brownsberger and Nick Collins on their victories,” she wrote. “I’m proud to call them colleagues and friends, and I’m grateful that they will continue bringing their experience, independence and leadership to the Senate.”

Support for GBH is provided by:

The Suffolk and Middlesex district race was widely viewed as a proxy war between Boston Mayor Michelle Wu and the state Legislature. Wu backed Lander, her former aide, in an effort to oust the longtime incumbent. Brownsberger did not support her plan to temporarily shift more of the city’s property tax burden onto commercial owners, which Wu has argued would shield homeowners from dramatic bill increases. The state’s legislative branch would have needed to approve the plan.

After the public clash, Wu threw her support behind not only Brownsberger’s opponent but the challenger of another Boston state senator — Collins — who also opposed her plan.

Collins prevailed in his primary with 54% of the vote, beating out two candidates.

Material from prior GBH News coverage was used in this story.