Longtime incumbent Sen. Pat Jehlen of Somerville kept her seat, but local voters played their part in putting an end to Rep. Tim Toomey’s near 15-year run at the State House in Thursday's primary election.

Somerville voters ousted Toomey in favor of rookie politician Mike Connolly of Cambridge. Connolly won by 180 votes in Somerville, which echoed tallies across the district, winning him the election with about 54 percent of the vote.

Connolly did not immediately respond to a request for comment, but Toomey conceded shortly after 9:30 p.m. with a Facebook post congratulating his opponent.

“My sincere congratulations go to Mike Connolly, who won a hard-fought victory tonight in the race for the Democratic nomination,” he wrote. “My deep trust and respect for the voters of the 26th Middlesex District continues on.”

Toomey said he would retain his seat on the Cambridge City Council.

Earlier this summer, Connolly told Wicked Local he ran for the seat out of a desire for new leadership and accountability within the state Legislature. Running against Toomey, who was first elected state representative in 1992, would be a “big challenge,” Connolly had said.

Raised in East Cambridge, Toomey earned a degree in government from Suffolk University in 1975, and in 1985, was elected to the Cambridge School Committee. Toomey was elected to Cambridge City Council in 1989, and has simultaneously acted as councilor and state representative for many years.

“People have noticed what I’ve done, as I have been elected every year and returned every time,” Toomey said in June.

While Toomey and Connolly agree on many major issues, like supporting the Green Line Extension, raising the minimum wage to $15 per hour and prioritizing affordable housing, their views differ on legalization of marijuana. During a debate at CCTV July 21, Toomey said he “does not think the state is ready” to legalize marijuana like alcohol. Connolly, however, has been an outspoken supporter of legalization.

Cheung vs. Jehlen

In the race for state senator, Pat Jehlen beat out Cambridge city Councilor Leland Cheung, winning 80 percent of the vote in Thursday’s primary election.

The Somerville senator has held the Second Middlesex district seat since 2005 and topped the vote in each the the district’s four cities—Somerville, Cambridge, Winchester and Medford. Jehlen took 84 percent of the vote in her hometown, pulling 7,142 votes to Cheung’s 1,336. In Cambridge she took 75 percent of the vote, with 3,552 to Cheung’s 1169.

Neither candidate immediately responded for a request for comment.

In March, Cheung announced his campaign against Sen. Jehlen who said she had not faced a primary challenger since first winning the seat and had not expected a challenger this year.

"I'm very aligned with my district," Jehlen said in March. "People have said, 'How would somebody run against you?'"

Cheung’s platform included taking on the faltering public transit system, unfounded school systems, the innovation economy that remains “inaccessible to many,” and the housing crisis that is forcing people out. One main issue where the candidates differ is charter schools. While Jehlen is against charter schools, Cheung has taken less of a stance.

Cheung said he plans to vote “yes” on the ballot question in November, but wishes there was an alternative, citing the lack of quality education for children as a central issue to impact the community in the years to come. Jehlen opposes Question 2 and has been campaigning against it.

Other Results

In the race for Middlesex County Sheriff, Somerville voters gave Peter Koutoujian 80 percent of the vote over Barry Kelleher. For Sixth Middlesex district councilor, Terrence W. Kennedy won 76 percent of the Somerville vote over Stephen Borelli and Richard DiMeo. U.S. Congress, Michael Capuano, state Rep. Denise Provost and state Rep. Christine Barber ran unopposed.

Check back for updates on this story.

Follow editor Erin Tiernan on Twitter @ErinTiernan

To contact Chronicle reporter Natalie Handy, email nhandy@wickedlocal.com or follow her on Twitter @nataliehandy.