State Sen. Jamie B. Raskin (Montgomery) won one of the most-watched Congressional primaries on April 26, defeating heavy-spending opponent David Trone for the Democratic nomination. (WUSA9)

State Sen. Jamie B. Raskin (Montgomery), outspent 6-to-1 by a wealthy Potomac wine retailer who poured more than $12 million of his own into his candidacy, won Maryland’s 8th Congressional District Democratic primary Tuesday.

Raskin, 53, a constitutional law professor, led with slightly more than one-third of the vote. He ran ahead of David Trone, who became the biggest self-funding House candidate ever. Former news anchor Kathleen Matthews ran third, followed by six other contenders who trailed by large margins.

Frederick attorney Dan Cox won the Republican primary and will face Raskin in the November general election for the House seat vacated by seven-term incumbent Chris Van Hollen. Raskin will enter the fall contest with a significant edge. Democrats have a 2-to-1 voter registration advantage in the 8th District.

The Democratic contest has drawn national attention as 2016’s most expensive House race, dominated by Trone’s deep pockets. Even without Trone’s cash, the primary in Washington’s prosperous Maryland suburbs became the nation’s priciest, with total fundraising near the $20 million mark. Raskin and Matthews each collected about $2 million, not counting $500,000 in loans the former WJLA reporter and anchor made to her campaign last month.

April 26 Maryland primary results

Other Democrats who trailed in Tuesday’s returns — Dels. Kumar P. Barve (Montgomery) and Ana Sol Gutiérrez (Montgomery), former White House aide Will Jawando, former State Department official Joel Rubin, nonprofit executive David Anderson, and former biotech executive Dan Bolling — raised a total of more than $1.7 million.

Raskin occupied the left-most lane in the left-leaning primary field. Sustained by a loyal grass-roots following in his Silver Spring-Takoma Park senatorial district, he campaigned as the proven progressive choice, focusing on a legislative record that first-time candidates Matthews and Trone lacked.

A three-term incumbent, Raskin was a key player in floor fights for repeal of the death penalty (2009) and legalization of same-sex marriage (2012). The following year, he worked with then-state Sen. Brian E. Frosh (D-Montgomery) to pass a state ban on the sale of semiautomatic rifles.

That record helped him draw dozens of endorsements from state and county lawmakers and the backing of labor, including the National Education Association, American Federation of State, County, and Municipal Employees in Maryland, and the International Association of Fire Fighters Local 1664.

Until late January, the primary was widely regarded as a duel between Raskin and Matthews — both relatively well-known and capable of raising significant sums.

Trone, a prominent national Democratic fundraiser and philanthropist, upended the campaign, entering just before the Feb. 3 filing deadline. The first-time candidate unleashed torrents of television, radio and digital advertising, augmented by direct mail and robo-calls, to tell the up-from-bootstraps story of his father’s failed farm and creation of his national chain of big-box beer and wine stores.

He told voters that paying his own way meant he could go to Congress unencumbered by big donors and free from having to raise money for the next election just two years away.

But Trone struggled to deflect charges that he was using his personal wealth to buy a Congressional seat.

“An election is not an auction,” Raskin frequently told ­audiences.

Trone also endured early missteps. He was forced to fire three staffers after they were discovered spying on Raskin and Matthews’s campaign operations. He offended some Democratic voters by telling a reporter that his campaign contributions to state-level officeholders — many of them Republican — were to “buy access” to help his company.

Unlike many self-funding candidates, Trone spent his money well, hiring a top-flight campaign team that included pollster Harrison Hickman and New York ad maker Jimmy Siegel, whose spots told the story of Trone’s rise and his commitment to attacking income inequality, protecting women’s reproductive rights and pushing for curbs on gun violence. But it wasn’t enough to put him over the top.

Trone attacked Raskin persistently in the final weeks of the campaign. He told a campaign audience that Raskin was “a polarizing figure from the left” unlikely to be successful in reaching out to House Republicans if ­elected.

While Raskin, a professor at American University, was outspoken in his criticism of money’s corrosive role in politics and the unfair advantage enjoyed by Trone, he was a multimillionaire in his own right, according to financial disclosure reports. Raskin and his wife, deputy treasury secretary Sarah Bloom Raskin, listed assets worth of up to $6.8 million. He exceeded his own fundraising expectations, collecting $1.8 million through April 6.

Cox, the Republican victor, was the most conservative candidate in the GOP field. He supported Sen. Ted Cruz of Texas for the Republican presidential nomination and subscribed to his “Five for Freedom” plan. It includes abolishing the Internal Revenue Service and the departments of Energy, Education, Commerce, and Housing and Urban Development. He also advocates eliminating payroll taxes and establishing a 10 percent flat tax for incomes over $36,000.

Four opponents trailed Cox Tuesday: Silver Spring elder-law attorney Shelly Skolnick; media consultant Aryeh Shudofsky; business consultant Liz Matory, also of Silver Spring; and Jeff Jones, senior pastor at North Bethesda United Methodist Church.