Mitt Romney’s campaign team has been quietly laying plans for an outreach effort to President Obama’s most loyal supporters — black voters — not just to chip away at the huge Democratic margins but also as a way to reassure independent swing voters that Romney can be inclusive and tolerant in his thinking and approach.

That plan, still in its early ­stages, ran headlong into the harsh political realities on the ground in Philadelphia on Thursday, when Romney was treated to a hostile welcome on his first campaign swing through a poor black neighborhood this year.

A few dozen protesters met him with chants of “Get out, Romney, get out!”

Madaline G. Dunn, 78, who said she has lived there for 50 years, said she is “personally offended” that Romney would visit her neighborhood.

“It’s not appreciated here,” she said. “It is absolutely denigrating for him to come in here and speak his garbage.”

Romney took his campaign to the Universal Bluford Charter School in West Philadelphia aiming to highlight his education agenda but also to connect with voters who were not part of his political calculus during the primary campaign. “I come to learn, obviously, from people who are having experiences that are unique and instructive,” he said.

Despite the obvious difficulties, Romney’s outreach to black voters could reap dividends even if he is unable to significantly chip into Obama’s support. “Suburban voters will be a real battleground, and upscale white voters like to think of themselves as tolerant and they won’t vote for a candidate that is seen as exclusionary, and the Romney folks must be aware of that,” said Bill Galston, a senior fellow at the Brookings Institution. “He has to persuade suburban voters that he isn’t Rick Santorum. He could break the mold a little bit and do some campaigning in African American communities. It would get people talking, and it would be all gain and very little pain.”

But there was evidence on Thursday that it would not be painless. Among the protesters heckling Romney from a distance were some of Philadelphia’s most prominent officials, all of them Democrats.

Mayor Michael Nutter quipped that Romney had “suddenly somehow found west Philadelphia.”

“It’s nice that he decided this late in his [campaign] to see what a city like Philadelphia is about,” Nutter said. “I don’t know that a one-day experience in the heart of west Philadelphia is enough to get you ready to run the United States of America.”

Philadelphia’s district attorney, Seth Williams, piled on.

“Instead of just talking at the school and getting back on his huge bus, he should come out, he should walk 60th Street, he should talk to folks who are out here that are mad so maybe he could understand how real Americans, those that live here in urban America, the issues that are important to us,” Williams said.

Romney campaign officials understand their challenge with black voters against a Democratic incumbent, particularly when that incumbent is also the first African American elected to the presidency. Still, they insist they will try.

“Yes, it is a bit harder this time. We have a black president. But we can’t go in with the mind-set that we aren’t going to win any people over to our side,” said Tara Wall, a former Bush administration official who was recently hired as a senior Romney communications adviser to handle outreach to African Americans. “From a messaging standpoint, we need to be able to communicate and relate to these communities about how they are being impacted by Obama’s policies. It’s the right thing to do, and it’s an important part of the process. It’s not a ploy, it’s not a tactic, it’s part of who we are. We have to show up.”

Wall, the most senior African American on Romney’s team, spent this week meeting with other top advisers crafting an outreach plan. As an adviser to the Republican National Committee, she played a key role in George W. Bush’s 2004 reelection, which is widely viewed as a high-water mark in Republican efforts to increase their share of the reliably Democratic black vote. Bush received 16 percent of the black vote in Ohio and snagged 11 percent nationwide.

Those efforts were reversed in 2008 as Obama swelled black turnout and got 96 percent of the black vote against Sen. John McCain (R-Ariz.). It was those high turnout levels that put Obama over the top in two traditionally Republican states — North Carolina and Virginia — and he will need a repeat performance to keep those states in his column this year.

The latest Washington Post-ABC News poll shows a similar margin, with Romney receiving 5 percent of the African American vote to Obama’s 92 percent.

Yet there are signs that some of that support may have eroded, as blacks have faced record-high unemployment — according to the latest Quinnipiac poll in Florida, Obama gets 85 percent of the black vote, down from 96 percent in 2008.

Wall, a former TV journalist from Detroit, acknowledges that making inroads with African Americans will be a challenge but said she senses that some black voters “aren’t feeling it this time” for Obama. They also hope to cause some second-guessing about Obama stewardship of the economy, which could lower enthusiasm for the president.

“There is no chance that Mitt Romney will do any better than John McCain did in 2008,” said Michael Fauntroy, author of “Republicans and the Black Vote.”

“Ultimately, it’s an indirect appeal. It’s about showing a willingness to show concern for all Americans and a way to come across as severely compassionate conservative,” ­Faun­troy added.

For some, Obama’s recent decision to back same-sex marriage has reframed some of the conversation, especially among black pastors who were among the first group to hear personally from the president, but outreach efforts have been ongoing for months, and campaign aides said they aren’t taking the black vote for granted, even with the overwhelming support.

Wall said Obama’s position on same-sex marriage, while hardly a game-changer, could give African Americans with strong religious beliefs a reason to look at Romney or to stay home. But Romney’s core message, she said, will be about black businesses and the 13 percent unemployment rate among blacks.

“The biggest factor is the economic situation that we, as in black folks, find ourselves in. It’s been horrendous,” Wall said. “All we’re asking is that people at least give Romney a listen.”