MARINETTE, Wis. — President Trump on Thursday visited a rural Wisconsin shipbuilder with a new Navy contract as he seeks to shore up support in a key presidential battleground state where recent polls show him losing ground to former vice president Joe Biden.

Trump toured the shop floor at Fincantieri Marinette Marine, gazing up as a welder threw sparks while working on an enormous hull. The shipbuilder will build a littoral combat ship under a U.S. military contract that Trump said will save some 1,000 jobs.

A nearly finished model loomed behind the outdoor stage where Trump delivered a short speech, the ship’s prow and decks draped in bunting. Dozens of orange-vested shipyard workers lined the main deck.

In one of several references to the military, Trump said the Navy “will be bigger and stronger than before” under his leadership and touted the increases in defense spending during his presidency.

“There is no budget when it comes to our military because we don’t want the wrong people running up the front lawn of the White House,” Trump said, in an apparent reference to the demonstrators in Lafayette Square.

Crowds of flag-waving supporters lined the road on the short drive from the landing zone where Air Force One arrived, many holding “Trump 2020” or “Women For Trump” signs. One shirtless man hoisted a huge “Gunowners For Trump” sign, and someone parked a boat in a driveway, decked with Trump flags. One man held a hand-lettered sign that simply read “Q,” in reference to the QAnon conspiracy theory whose adherents overlap with some right-wing Trump support.

Protesters were few. One person raised a “Biden” campaign sign, and a few hand-lettered signs appeared to mock Trump, including one that read “Go Back to Your Bunker.”

Neither Trump nor his top staff wore face masks during the tour or speech, although some shipyard employees did so.

Trump carried Wisconsin by the narrowest of margins in 2016, but it is among the competitive states with large white working-class populations where Biden, the presumptive Democratic nominee, has built a lead as the nation grapples with the coronavirus outbreak, economic downturn and unrest over racial injustice.

A New York Times-Siena College survey released Thursday shows Biden leading Trump 49 percent to 38 percent among registered voters. He had a slightly narrower lead, 49 percent to 41 percent, in a Marquette University Law School Poll released Wednesday.

Although billed as an official White House event, Trump’s trip to the Fincantieri Marinette Marine shipyard in Marinette is clearly designed with November in mind. It is part of a pattern of Trump focusing his travel on states key to his reelection bid.

Trump touted a contract worth up to $5.5 billion for design and construction of Navy warships — a deal that will bolster jobs in a rural part of a state where turnout by conservative voters could be key to the president’s reelection prospects.

While in Wisconsin, Trump also taped a town-hall event with Fox News’s Sean Hannity in Green Bay that is scheduled for broadcast Thursday night.

Underscoring the importance of the state to the Trump campaign, Vice President Pence also visited this week, staging an event aimed at evangelical voters, another key demographic for the Republican ticket.

Ahead of Trump’s visit, Biden issued a statement charging that Trump is attempting to “paper over the fact that Wisconsin has been bleeding blue-collar manufacturing jobs.” The statement also highlighted the Trump administration’s efforts to dismantle the Affordable Care Act, President Barack Obama’s signature health-care law.

“No one in this country should have to lay in bed at night staring at the ceiling wondering what they will do if their husband or wife has a heart attack or their son or daughter gets cancer,” Biden said. “But if Donald Trump gets his way, many sleepless nights await families in Wisconsin and across this nation.”

The new polling out of Wisconsin suggests the race has shifted in Biden’s favor in recent months, a period that has coincided with fallout from the coronavirus pandemic and the death in Minneapolis police custody of George Floyd — both of which have tested Trump’s leadership.

In Marquette polls, Biden and Trump were tied in February. Biden held a three-point margin in surveys conducted in March and May. His lead in the new poll is eight points.

“This has been a good gain for Biden at this point,” poll director Charles Franklin said. “And it’s a relatively widespread gain. He’s picking up across different regions and different groups.”

In the 2016 presidential election, Trump unexpectedly won Wisconsin with 47.2 percent of the vote, compared with 46.5 percent for Democrat Hillary Clinton.

Trump lashed out Thursday at recent polls showing him trailing Biden.

“The Fake News and phony Fake Suppression Polls have never been worse,” he tweeted. “The Lamestream Media has gone CRAZY!”

The tweet was sent as Trump was traveling from the White House to the Korean War Veterans Memorial, where Trump participated in a wreath-laying ceremony.

Seung Min Kim contributed to this report.