Washington (CNN) -- The uproar last week over a proposed campaign ad highlighting President Barack Obama's former pastor, Rev. Jeremiah Wright, lit up political circles before organizers finally backed off the idea.
And Mitt Romney came under fire from evangelicals before his speech to Liberty University in Virginia earlier this month because some at the traditional Christian school still believe Mormonism is a cult.
Two very different candidates joined by similar, yet hollow, attacks on their faith illustrate the intense mix of identity politics simmering just beneath the surface of the presidential race.
When it comes to faith and race, there are some who want to paint both candidates as outside the mainstream, not members of the traditional American club. They want to paint them as "others."
Both Obama, the nation's first black president, and Romney, a Mormon, have found that their shared status as members of minority groups and political pioneers, in many ways, has also changed the rules of this presidential campaign cycle, said Nancy Wadsworth, co-editor of the anthology "Faith and Race in American Political Life."
"It's the elephant in the room," Wadsworth said. "On the Democratic side, the liability of raising (Romney's) Mormonism and putting it under closer scrutiny means they will be accused of religious intolerance. If (Republicans) bring up Jeremiah Wright, they'll be accused of using the race card."
So both presidential campaigns are adhering to a tenuous, unwritten hands-off agreement when it comes to race and religion even as they themselves struggle to navigate those waters. But the same rules may not neccesarily apply to their supporters, third-party groups and well-heeled super PACs.
Romney condemned the Wright ad proposal pitched to billionaire Joe Ricketts and his conservative super PAC. Likewise, senior Obama campaign adviser David Axelrod reiterated to Candy Crowley on CNN's "State of the Union" Sunday that critiques of Romney's Mormonism are "not fair game."
The success or failure of the two campaigns' attempts to remove these topics from the table could speak volumes this fall on how far the nation has come on divisive race and religion-based debates in the political sphere, political experts say.
It won't be easy.
Outside groups, such as the conservative website "The Daily Caller," have criticized Obama for eating dog meat as a child growing up in Indonesia. Republican Arizona Secretary of State Ken Bennett is demanding Hawaiian officials authenticate Obama's U.S. birth certificate, or he may remove the president from the ballot.
Montana Gov. Brian Schweitzer, a Democrat, recently questioned whether female voters could back Romney, because his father was "born on a polygamy commune in Mexico." According to a recent Gallup poll, Democrats were far more likely than Republicans -- 27% to 18% -- to vote against a Mormon candidate.
Some Democrats struggle to contend with Obama's race. Vice President Joe Biden was recently dispatched to Democratic stronghold Jefferson County in the important swing state of Ohio, in part because Obama barely eked out a win over John McCain in the predominately white, working-class community.
Some Republicans wrestle with Romney's religion. During the primary and caucus season, several social conservative and religious leaders secretly met in Iowa to find and support any other Republican candidate besides Romney, citing his faith as a major issue.
"There will be a number of Republican evangelicals who stay home because of Romney's Mormonism," said Clyde Wilcox, a government professor at Georgetown University.
Hundreds of evangelical alumni and students at Liberty University, an institution founded by Rev. Jerry Falwell, balked on Facebook when the school invited Romney to speak at commencement. Rev. O'Neal Dozier in Florida and Scott Thomas in Pennsylvania, prominent Rick Santorum supporters, made derogatory comments about the Mormon faith.
The claim is that Barack Obama is secretly a Muslim, Wadsworth said. The reason that it works is it signals through code his otherness, he said. "Race is always there."
"Obama can never get out from under his racial difference. He has to position himself as not 'other'. Race serves Romney because his whiteness reads him as insider. But on religion, he has to tell a story about how his Mormonism is an American religion and coincides with his conservative base."
On both fronts, Obama and Romney are still trying to find their footing.
Obama has faltered a bit in the past while navigating the thorny issue of race. He made what was seen as a historic speech on race in March 2008 in the aftermath of the Wright controversy.
However, Obama's remarks in 2009 that a white Cambridge, Massachusetts, police officer acted "stupidly" in arresting Henry Louis Gates Jr., a black Harvard professor, and his administration's hasty firing of Shirley Sherrod in, a black former Department of Agriculture official, after her comments about a white farmer were taken out of context in 2010, were seen as missteps.
Obama's delayed response after unarmed black teen Trayvon Martin was shot indicated the president and his advisers were "gauging the cultural landscape," said Mark Anthony Neal, an African-American studies professor at Duke University and the author of several books, including "New Black Man: Rethinking Black Masculinity."
For his part, Romney in previous campaigns has weathered insults about his religion. In a February interview with conservative Fox host Sean Hannity, Romney criticized comments that he saw as Obama saying "we must be a less Christian nation."
And Romney, through appearances with his wife and family, is carefully honing a narrative that seeks to make him seem more like the rest of the nation, Wadsworth said.
"The fact that the leading GOP candidate is a Mormon has changed the dialogue," Wadsworth said.