For years, politicians have delivered the same grim message to the nation’s long-suffering manufacturing heartland: Many of the jobs are gone, shipped overseas, never to be seen again.

In his 2008 presidential campaign, Sen. John McCain (R-Ariz.) famously — and ill-advisedly — told Michigan voters that the jobs “are not coming back. . . . And I am sorry to tell you that.” President Obama said as much during a 2009 visit to the state.

But this year, in a White House contest defined by the economy and job creation, that harsh truth-telling has given way to a more hopeful pitch from Obama and the Republicans trying to replace him amid the strongest uptick in manufacturing employment in 15 years.

“Manufacturing is coming back. Companies are bringing jobs back,” Obama told a crowd of employees on a factory floor in Milwaukee on Wednesday.

Republican presidential candidates Mitt Romney and Rick Santorum are focusing on manufacturing this week ahead of primaries in Michigan on Feb. 28 and Ohio a week later that will be crucial in determining the winner of the GOP nomination and the fall general election.

The renewed emphasis on the sector sets up a debate between the two parties that will play out across the Midwest this year in several of the nation’s most hotly contested states. Obama has worked closely with labor unions on bailing out the auto industry, and he describes organized labor as an important force that helps workers earn higher wages. That stance puts him at odds with GOP candidates who favor laws that ban union-only plants.

That fissure was clear on Wednesday, when Obama and Romney both used industrial backdrops to deliver their messages.

At an office furniture warehouse in Grand Rapids, Romney blasted Obama and the “union bosses” who back him. “Crony capitalism, that’s the path he’s taken,” Romney said. “He got hundreds of millions from labor bosses for his campaign.”

Obama took a brief tour of Master Lock, a Milwaukee padlock maker that he praised during his State of the Union address last month for being a “unionized plant” and for bringing 100 jobs back from China as that country’s labor costs rose.

Obama reminded the Master Lock workers that the auto industry has begun to grow again after his administration extended emergency loans in 2009 that helped keep General Motors and Chrysler in business. Both firms are now adding jobs.

“What’s happening in Detroit can happen in other industries,” Obama said. “It can happen in Cleveland and Pittsburgh and Raleigh and Milwaukee. That’s what we’ve got to be shooting for, to create opportunities for hard-working Americans to start making stuff again and selling it around the world.”

Republican presidential candidate Rick Santorum will speak to the Detroit Economic Club on Thursday. He is also expected to deliver a jobs message focused on his ideas to revitalize the nation’s manufacturing sector.

Santorum’s plans call for zeroing out the corporate income tax on manufacturers and limiting the tax on overseas profits reinvested in the United States.

“We want to encourage manufacturers to grow and make things in America and get those jobs back,” he said at a town hall meeting in Idaho on Tuesday.

The nation has gained more than 400,000 factory jobs in the past two years, the country’s first sustained growth in manufacturing work since 1997.

The manufacturing boost is particularly apparent in presidential swing states such as Ohio, Michigan, Wisconsin and Pennsylvania, where the sharp decline in factory jobs plunged much of the region into economic distress long before the recession hit. Now unemployment rates in these states are falling, and some are at or below the national average.

Still, the growth in manufacturing jobs amounts to little more than a drop in a leaky bucket. The new positions created over the past two years replace just one-fifth of the more than 2 million factory jobs lost during the recession, from December 2007 through June 2009.

Overall, the country has 5 million fewer manufacturing jobs now than it did in 2000, according to government statistics.

Nonetheless, the nation harbors a strong nostalgia for a robust manufacturing sector that employs large numbers of Americans. One of the most talked about ads during the Super Bowl was a “Halftime in America” spot featuring Clint Eastwood, framed by an industrial plant, touting the recovery of Chrysler and a bright manufacturing future.

As the Republican presidential race turns to manufacturing-heavy states such as Michigan and Ohio, Obama and the GOP candidates are invoking manufacturing as a way to restore middle-class prosperity.

Newt Gingrich toured a metal plant in Cleveland last week, telling workers on the shop floor that manufacturing jobs are crucial to national security.

“We have to have companies like this. You cannot be the arsenal of democracy if you don’t have an arsenal,” he said. “We very badly need to rebuild our manufacturing base so that we are competitive.”

Romney, noting that he hails from the Detroit area and that he was saddened by the steep decline in that former manufacturing stronghold, has said: “I will work to bring manufacturing and all good jobs back to America.”

Part of Romney’s plan is to be tough on nations such as China, which he has described as “stealing jobs” by keeping the value of its currency artificially low, thereby making its exports cheaper.

“Some of the nations around the world with very low labor rates have found if they artificially depreciate their currency, they can make their prices even lower. By doing so, they have displaced American manufacturers and a lot of jobs,” Romney said.

Economists call the recovery in manufacturing jobs crucial to the fortunes of the vast majority of American workers who are not college graduates, because factory jobs tend to pay better than other jobs for workers with comparable educations.

Although U.S. factories have been boosting output steadily since the recession because of strong auto sales and a continued investment in machinery, a significant gap still exists between the recent surge in corporate profits and much more modest growth in American jobs.

The fact that some of the country’s best-known multinationals do not release numbers about the jobs they have here and abroad has become a hot-button issue in Congress lately. In February, Rep. Gary Peters (D-Mich.) introduced a bill that would require firms with more than $1 billion in revenue to report the breakdown and track the increase or decrease over the previous year.

“You’ve all heard enough about outsourcing. Well, more and more companies like Master Lock are now insourcing, deciding that if the cost of doing business here is not too much different than the cost of doing business in places like China, why not do it right here in the United State of America?” Obama told the crowd in Milwaukee. “Why not put some Americans to work?”

Staff writers Nia-Malika Henderson and Karen Tumulty contributed to this report.