Democrat Seth Moulton won the 6th Congressional District in Massachusetts Tuesday, defeating Republican Richard Tisei. The seat had been held by Democrat John Tierney, 62, since 1997.

Tierney has been in political trouble since his wife was convicted on federal tax charges four years ago, for which she received a 30-day prison sentence with five months of house arrest. He was defeated in the Democratic primary in September by Moulton, 36. Moulton has an MBA from Harvard and served four tours of duty in Iraq. He also held a summer associate position at Goldman Sachs and later became a top aide to Gen. David Petraeus.

Moulton held his primary victory party at the Veterans of Foreign Wars post in Salem. “Our win tonight says two things,” he said to the crowd at the time. “First, that we are fed up with the gridlock in Washington, and second, that voters want to keep this seat blue.”

Tisei, who is openly gay, has connections to the region's LGBT community, but had previously made it clear that he didn’t want to be defined by that trait.

#BREAKING: Seth Moulton (D) beats Richard Tisei (R) in 6th District U.S. House race. #fox25 pic.twitter.com/rt4b9eMl1A — FOX 25 News Boston (@fox25news) November 5, 2014

Tisei, 52, is a real estate agent who served in the state Legislature for 26 years, and narrowly lost to Tierney in 2012. At the time, he was the Republicans’ best bet in the Massachusetts House delegation, which has been all-Democratic for nearly two decades. This led to a lead in the polls in early October, which analysts attributed to Republican enthusiasm, according to the Wall Street Journal.

At the time, Tisei claimed that many former Tierney supporters were turning to him. “There were people who were very loyal to John Tierney who have called me and said they’re voting for me,” he told the Boston Herald. “So it’s an unusual coalition that I’ve put together.”

The Boston Globe called the 6th District race “the liveliest in the region.” The race had the “biggest discrepancy between nonparty outside spending and candidate spending,” according to the Center for Responsive Politics. Outside groups outspent the candidates themselves by nearly $2 million. Candidates themselves were relatively similar in spending, with Tisei’s 2014 total at $3,872,880 and Moulton’s at $3,706,480.