The presidential battleground has shifted on the margins five weeks before Election Day, with President Trump still on defense as the contest with Democratic nominee Joe Biden is fought almost entirely in places that Trump won in 2016.

Of the 13 states where Biden spent money on television last week, according to Biden’s head of paid media Patrick Bonsignore, only three — Minnesota, New Hampshire and Nevada — were won by Hillary Clinton four years ago. Of the 12 states where Trump is spending, all but Minnesota and Nevada are places that he won in 2016.

Biden has committed millions to advertising in Georgia and Iowa, where Trump won in 2016, while Trump’s campaign continues to decrease his investment in other states, including New Hampshire and Michigan, as the candidates prepare for the first presidential debate Tuesday.

The decision to add funds reflects both the Democratic cash advantage and the Biden campaign’s increasing optimism as polls show Trump struggling to make up ground in a contest that has been remarkably stable from the start, despite waves of social unrest, pandemic disease, economic dislocation and the beginning of a nasty partisan battle over the future of the Supreme Court.

The Biden campaign has recently launched distinct paid media programs for veterans, rural voters and Black voters, catching up with Trump, who debuted similar programs months ago. Biden has also been buying billboards, in concert with the Democratic National Committee, to encourage early voting in key states.

This week, another Biden program targeting faith voters is slated to launch, with advertising on gospel radio, during televised Sunday services, and on Spanish language stations. The program could help defend Biden against Republican claims that Democratic opposition to Trump’s Supreme Court nominee, Amy Coney Barrett, reflects an anti-Catholic bias.

“We think there is a real opportunity there, not only because it is something that is so authentic to who Joe Biden is, his abiding Catholic faith, but in the places that get us to 270, there are significant pockets of voters we want to have that conversation with,” Bonsignore said.

The symbolic and strategic core of the race remains in the northern states of Wisconsin, Minnesota, Pennsylvania and Michigan, a traditionally Democratic region where Clinton underperformed, giving Trump the presidency. But so far this year, Biden has maintained an apparent connection to White voters in these states and elsewhere that Clinton let slip away as she lost all but Minnesota.

That connection also has boosted Biden’s chances in states like Ohio and Iowa, which were long considered to be in Trump’s corner because he won them so convincingly in 2016. Trump held two rallies in Ohio last week and will return there for the presidential debate with Biden on Tuesday night. Biden is scheduled to campaign in Ohio and Pennsylvania the next day.

Biden’s appeal has also blunted Trump’s efforts to flip Minnesota, which the president has long sought to move into his camp, at the same time the president battles political fallout from rapidly diversifying states like Georgia and Arizona. Trump has continued to hold his own in Florida and North Carolina, where the races are a dead heat.

“The tipping point states that people thought would be tipping point states in the spring are likely to be tipping point states now,” said Michael Halle, a Democratic strategist who worked for former South Bend, Ind., mayor Pete Buttigieg this cycle. “What has changed is the significant money advantage that Biden has.”

While Trump has continued to poll better than his 2016 election result among Black, Hispanic and other non-White voters, by about 10 points, he has lost considerable ground among other segments of the population, including a 14-point shift to Biden of voters over the age of 65 and a 12-point shift among White voters, according to a Washington Post average of public national polls.

The same polling shows that Trump has been able to recover from a dip in June and July, when the protests against police brutality dominated headlines and coronavirus cases began spiking. The Biden campaign now registers the same advantages they believed they had during the Democratic primary, raising their confidence that voter opinions will stay static through the coming Supreme Court nomination fight, the three presidential debates and any other surprises. Trump is counting on the debates and the nomination hearings to boost his standing.

“This race has been stable for 18 months,” said one Biden campaign adviser, who spoke on the condition of anonymity to speak more frankly. “We are not even talking about eight months. Since the midterms, this race has been stable.”

That was underscored Sunday when a Washington Post-ABC News poll found Biden had a 53 percent to 43 percent lead over Trump among registered voters, statistically unchanged from an August poll that found a 12-point spread. The September Biden lead, driven by high female support, was six points among likely voters.

Biden now polls seven points ahead in Wisconsin, down from nine points in June and July, seven points ahead in Michigan and seven points ahead in Pennsylvania, down from 11 points in June and July, according to a Washington Post average of polls. In Minnesota, the president trails by 10 points.

The Trump campaign has argued that the campaign’s significantly larger surrogate and field operation will provide a further boost by November and make up for ad deficits. They also point to Trump’s far more aggressive travel schedule, which has regularly drawn thousands to indoor and outdoor settings, which the campaign argues is a sign of high voter enthusiasm.

But behind the scenes, Trump advisers have grown frustrated that it has been difficult to land attacks on Biden — who is largely staying off the radar — and that the race has hardly budged, with Trump behind, according to four officials. They feel more comfortable in Florida and North Carolina than other states but acknowledge they are playing defense in places like Georgia.

“It has tightened. The president is trailing, but not by an insurmountable margin,” said one Republican strategist, who spoke on the condition of anonymity to discuss private data. “The president’s campaign can only do what it can do. They only have so many resources, and they can only spend in so many states.”

The president has joked to advisers that they are putting too many events on his schedule, three aides said, but the goal is to draw a sharp contrast with Biden, hoping voters will reward him for showing more effort in a pandemic. They are also leaning heavily on an extensive surrogate program that sends Trump boosters around the country, for instance trying to impress suburban women by sending presidential adviser and daughter Ivanka Trump into districts.

Trump campaign officials once bragged about fighting in 17 battleground states — but they concede now that hopes of expanding the map in their direction has largely faded. “It’s really about seven or eight states at this point,” said a senior campaign official, who spoke on the condition of anonymity to discuss private information.

A Trump campaign cash crunch that started in late summer has also forced the campaign to regularly pull or reduce television reservations this month, ceding to Biden’s already substantial on-air dominance. Over the week that began Sept. 22, Trump pulled $2.1 million in television reservations from the four core northern states, or about 30 percent of his scheduled buy there, according to Advertising Analytics.

Some of those funds were shifted to Florida, where Trump is preparing for an avalanche of pro-Biden outside spending funded by billionaire Mike Bloomberg.

Biden’s campaign advisers also say that even though Trump is outspending them on Google and Facebook, the former vice president is spending more where it counts, on Facebook and YouTube ads in the targeted swing states. Trump, by contrast, is spending more on digital fundraising efforts in states that are not up for grabs.

The weekly Trump television cutbacks have been particularly stark in Michigan, a state that Trump won by less than a quarter of 1 percent in 2016. The Biden campaign’s ad buyers estimate that Trump has been halving his investment in the state, despite a competitive Senate race. Since late March, the Trump campaign and outside allies have spent about $9.5 million on television in the state, compared with about $37 million on the Democratic side, according to Democratic tracking of the television spending.

But there are few signs that Trump will formally withdraw from the state, as surrogates have continued to travel there and Trump visited as recently as Sept. 10. In the meantime, Trump television advertising in New Hampshire, another state Clinton narrowly won in 2016, has effectively stopped for weeks, as several Republican strategists say the state could be slipping away. Though a plurality of New Hampshire voters are unaffiliated, the share registered as Democrats has been growing, in February eclipsing the number of Republican voters for the first time in 10 years.

Trump campaign officials deny that the television spending shifts predict a loss, pointing to recent office openings, frequent surrogate visits and a large paid staff presence on the ground.

“Donald Trump is going to win New Hampshire,” said Corey Lewandowski, a campaign manager for Trump in 2016 who now works as a senior adviser to the reelection effort. “The enthusiasm is intense.”

While Trump has been cutting back, the Biden campaign has faced the opposite problem, as fundraising has exploded in recent months: where to spend all its money.

Besides the new targeted media programs, the money has paid for ads in the two typically red states where Trump has been forced to hold ground once thought safe. One Biden campaign aide said the former vice president planned to spend more than $10 million on television in Georgia and millions more in Iowa, two states where Democrats also are hoping to pick up as many as three Republican Senate seats this year. To date, Trump and his allies have been advertising unopposed in Georgia and they had been outspending Democrats in Iowa on the airwaves.

Republicans have reacted with alarm about Georgia, where two U.S. senate seats are on the ballot, though they hope the coming Supreme Court fight will minimize the risk of crossover voting for Biden and other Democrats.

“Broadly there has been a lot of concern about Georgia for the entirety of the cycle,” said one Republican strategist who has focused on the state but was not authorized to speak publicly. “The Atlanta suburbs are exploding and they are registering a lot of new voters and that needs to be addressed.”

Democrats are hopeful that the Biden investment will have significant benefits down the ballot, both for Senate races and for state legislative and congressional contests.

“The thing about the Biden campaign that goes unappreciated is the way they have been communicating is down the middle of the road, on jobs, health care and covid,” said J.B. Poersch, the president of the Senate Majority PAC, an independent effort to elect Democratic senators. “It’s been a very good workmanlike approach compared to the very frenetic approach coming out of Trump.”

Even in Ohio, a state filled with White voters without college degrees who delivered Trump an 8-point victory in 2016, the race is effectively tied in public polls, forcing Trump to sink precious resources into the Columbus and Cincinnati television markets, where Biden has yet to spend.

“It’s tied but there is a lot more room for Biden to grow,” the state’s Democratic Party chairman David Pepper said Thursday. “Trump knows he has to work to win Ohio. I don’t think he visited here earlier this week just for the fun of it.”

For Democratic strategists allocating money to the presidential race, the fact that Trump and his outside groups are focused so much on states that he just needs to hold on to is among the best news of the last month.

The Democratic group Priorities USA, which invests heavily in battleground polling, currently predicts that Pennsylvania will deliver the 270th electoral vote to Biden.

Their current data show 54 percent of the Republican spending is now on states more likely to be won by Trump than Pennsylvania, compared to 25 percent on states less likely to be won. By comparison, the Democratic side is clearly playing offense, with half its money going to states where Trump is polling stronger than Pennsylvania, compared to 25 percent where he is weaker.