Updated

In a stunning defeat, nine-term incumbent U.S. Rep. John Tierney on Tuesday lost a bitter Democratic primary contest to political newcomer Seth Moulton in the state's 6th Congressional District.

Tierney is the first sitting Massachusetts congressman to lose a primary since 1992, when former U.S. Rep. Marty Meehan beat then-incumbent Chester Atkins in the Democratic primary.

Moulton, a former Marine and Iraq war veteran from Salem, will face Republican Richard Tisei in the November election. He credited his win in part on voter frustration with Congress.

"It's time for a new approach to end the gridlock in Washington," Moulton told supporters Tuesday night. "It's not enough to blame the Republicans for the lack of progress at a time when our country faces so many challenges. And it's cynical to think we must accept it."

Tierney, in a brief concession speech, said he was proud of "an amazing 18 years" in office.

"It was always about making sure that people had opportunity, that our children had at least the same opportunity that we had," Tierney said.

Moulton ran a well-financed campaign and suggested Tierney had been ineffective in Congress. By mid-August, Moulton had raised $1.6 million compared with the $1.9 million raised by Tierney.

During much of the primary Tierney had focused his attention on Tisei.

Then, late in the primary, Tierney launched a campaign ad linking Moulton to Republicans who support gun rights and oppose abortion rights. The ad focused on money the Moulton campaign received from the White Mountain PAC, which is affiliated with former U.S. Sen. Judd Gregg, a New Hampshire Republican.

Moulton said the ad showed that Tierney believed he was a serious challenger.

Moulton also argued he would have a stronger chance of holding off Tisei, a former state senator who lost to Tierney by less than 1 percent of the vote in the 2012 election.

"I look forward to contrasting our vision with that of Richard Tisei's," Moulton said. "We won't get fresh thinking and new leadership by sending someone to Washington who was first elected to office when I was 6 years old."

Tisei said he'll be the most effective advocate for change and progress in Washington.

"Seth himself has said repeatedly in Congress he would vote the same as John Tierney," Tisei said in a statement. "That means Seth (Moulton) will rubberstamp the failed direction Washington is taking our country."

Immigration attorney Marisa DeFranco and two other Democrats, John Gutta and John Patrick Devine, also were on the primary ballot.

It was the second tough campaign for Tierney. In 2012, he was dogged by questions about what he knew of an illegal offshore gambling ring involving his wife's family.

Moulton, a 35-year-old businessman and Harvard graduate who enlisted in the Marines in 2001, has expressed his opposition to another ground war in Iraq as President Barack Obama considers the nation's options for fighting back against Islamic State militants.

Moulton also backs abortion and gay rights, tighter restrictions on gun ownership and comprehensive immigration reform. About 8 percent of the district's population served in the military, and about 15 percent are age 64 or older.

During the primary, Moulton suggested that Tierney's victory two years ago was due in part to the political coattails of Obama and consumer advocate Elizabeth Warren, who were on the ballot and helped draw Democrats to the polls. Warren won a U.S. Senate seat against Republican Scott Brown, who two years earlier had won a special election to serve the remaining term of the late Sen. Edward Kennedy, a Democrat.

Tierney had rejected Moulton's suggestion, arguing that he had the issues on his side.

The general election could be equally hard fought. Republicans see the 6th Congressional District at their best chance to pick up a seat in Massachusetts.

Tisei has already been the beneficiary of a $350,000 ad buy from the conservative U.S. Chamber of Commerce earlier in the year. The 30-second ad, which ran on TV and online in May, portrayed Tisei as "an independent voice for Massachusetts."