Political newcomer Seth Moulton unseated 18-year incumbent U.S. Rep. John Tierney in one of the most surprising primary results Tuesday night.

Moulton, a former Marine and Iraq veteran, wrested the Democratic nomination for the North Shore’s sixth congressional district from the current nine-term congressman by a nearly 8-percentage-point margin.

The steady drip of controversy that has haunted Tierney since his wife was convicted of gambling-related tax evasion three years ago finally caught up with him.

Moulton won with nearly 34,500 votes, totaling 49.3 percent of all votes, compared to 41.4 percent for Tierney, who brought in about 28,900 votes. The incumbent conceded shortly before 10 p.m.

“This was just an amazing 18 years, and we appreciate it, and we appreciate you standing with us all the way,” Tierney said in his concession speech.

Tierney supporters like Jerry Darcy were shocked by the outcome.

“I always thought anyone who lasts that long, the only reason they last that long is they must be doing a good job,” Darcy said. “But nothing’s forever, you know.”

Moulton, a Harvard Business School graduate, will go on to face Republican challenger Richard Tisei in November.