One of the Democrats' top recruits in their push to take control of the U.S. House keeps a Ronald Reagan photo in a South Jersey office.

State Sen. Jeff Van Drew has voted against several tougher gun laws and same-sex marriage, and supported an effort to pull New Jersey out of a greenhouse gas reduction program.

Yet Van Drew, from Cape May County, is backed by national Democrats and is the heavy favorite in a South Jersey race that represents one of their best chances to capture a Republican-held district. He is the most prominent of four Democrats aiming to replace Rep. Frank LoBiondo, whose retirement opened the door to a seat that the party has coveted for years.

It is the marquee contest on the ballot in the June 5 New Jersey primary, as Republicans and Democrats choose nominees for U.S. Senate, 12 seats in the U.S. House, and various municipal offices.

The campaign mirrors a struggle that has played out in several Democratic primaries across the country, including in the Lehigh Valley, Nebraska, and Texas — between moderate candidates with some conservative views and rivals who pledge fealty to liberal ideas and say their views will rally the party's energized base.

"We have Republicans masquerading as Democrats, and the people are not going to buy into that," said Tanzie Youngblood, a retired educator who also is seeking the nomination.

Democratic political professionals and numerous independent analysts say Van Drew is best suited to a district with a sizable share of moderate and conservative voters. Democrats' national congressional campaign arm had tried to recruit him for years and is aiming to win the 23 seats needed to build a House majority.

"You don't get anything done if you don't win," said Van Drew, whose campaign website denounces "extreme elements" in both parties.

He is one of a number of moderates who have won support from the Democratic Congressional Campaign Committee as they compete in conservative places like Kansas, Arkansas, and West Virginia. Many have taken cues from Conor Lamb, who strayed from Democratic orthodoxy to win a special election in Western Pennsylvania earlier this year.

But in some cases, liberal voters have sunk candidates who played for the middle ground.

In primaries May 15, Democrats in the Lehigh Valley rejected Northampton District Attorney John Morganelli, who held conservative views on immigration, and those in Nebraska chose a liberal newcomer over a moderate former congressman supported by the national party.

National analysts downgraded Democrats' chances of winning the Nebraska race as a result, and some Democrats have fretted that pushing left could cost them in other swing districts.

In another contentious House race in Texas, a moderate backed by party leaders defeated a liberal opponent Tuesday.

Most analysts expect a similar result in the South Jersey race.

"It is no secret that Jeff Van Drew has been the most conservative Democrat in the state legislature, and behind closed doors I think that many party leaders would tell you that they are kind of holding their nose and supporting him," said Brigid Harrison, a Montclair State University political science professor who lives in the Second District. "But the reality is that he has some key advantages."

Van Drew is well-known, having served in the state legislature since 2002, Harrison said. He has won multiple terms in a historically Republican legislative district — one that makes up a substantial part of the congressional district. And he has support from the South Jersey political machine led by George Norcross III. Critically, the Democratic committees in all eight counties in the district endorsed Van Drew. That assures him of a favorable ballot position that by itself often determines New Jersey primary elections.

Campaign disclosures from the end of March show that he had raised $489,000. None of his rivals had cracked six figures.

Taken together, "I would call it a nearly insurmountable obstacle for his opponents," Harrison said.

Van Drew's rivals argue that Democrats don't need to tamp down liberal ideas in a district that Barack Obama carried twice.

"It's a diverse place. This is not the kind of place where we need a Trump Democrat," said Nate Kleinman, a farmer and activist from Salem County. "We need a real Democrat."

Another Democratic candidate, Will Cunningham, said grassroots voters feel "betrayed" by the attempted "coronation" of Van Drew.

Democrats almost certainly must win this district if they hope to take the House.

It's a true swing seat. Despite Obama's success, President Trump carried it by five percentage points in 2016 and it sent LoBiondo to Congress for 24 years — a tenure made possible by his willingness to break with the GOP on some key votes.

Without him, Republicans have a four-man field that has divided loyalties among the county parties. Rep. Steve Stivers (R., Ohio), the head of the GOP's congressional campaign arm, recently called the district a "recruiting hole," but later tried to temper those comments.

The four GOP candidates are Hirsh Singh, who lost a race for the gubernatorial nomination last year; former state Assemblyman Sam Fiocchi; former FBI agent Robert Turkavage; and attorney Seth Grossman.

The Cook Political Report, a nonpartisan election-forecasting site, rates the district as one of Democrats' six best chances to flip a Republican seat.

Van Drew's liberal critics have homed in on his "A" rating from the NRA, his acceptance of a $1,000 donation from the group in 2008, and his opposition to several gun control proposals.

"New Jersey voters don't want an NRA-backed candidate," Cunningham said.

Cunningham, 32, grew up in Vineland, the son of a single mother in a family forced to live in a motel for part of his high school years. He went on to Brown University and formerly worked as an aide to Sen. Cory Booker (D., N.J.).

Kleinman, 35, supports impeaching Trump and a guaranteed income for all Americans. A Montgomery County native, he tried to run for Congress in 2012 in a district that included parts of Philadelphia and Montgomery County.

Youngblood, a 62-year-old from Gloucester County, points out that she is the only woman in the contest. The Congressional Black Caucus endorsed her.

The three hopefuls, however, could split the progressive vote. Unlike in some other races that saw upsets, prominent liberal groups like the Progressive Change Campaign Committee and the Bernie Sanders-aligned Our Revolution have not endorsed in this race.

Meanwhile, Van Drew, 65, has tried to soften some of his most controversial stands. He says he now backs same-sex marriage as the law of the land, and has stressed that he supports universal background checks for gun purchases and a ban on bump stocks.

The gun control group Moms Demand Action has labeled him a "Gun Sense Candidate."

Van Drew said he identifies as a Democrat because the party is "pro-working-person." He said he admires Reagan's communication skills — while stressing that his offices have pictures of many presidents, including Franklin D. Roosevelt and John F. Kennedy.

Van Drew's views could cause Democrats headaches if they win a narrow House majority, Harrison said. But party leaders are more worried about first taking the House — giving them a platform to set the chamber's agenda, investigate Trump, and stall Republican proposals.

As their House leader, Nancy Pelosi, put it earlier this month when asked about Democrats who are even campaigning against her: "Just win, baby."