WASHINGTON - During his first presidential campaign, Mitt Romney often turned his home state into the butt of jokes, portraying himself as a lone culture warrior in a bastion of gay-marriage activists, scientists experimenting with human embryos, and reckless liberals who had given rise to blighted neighborhoods ruined by poverty.

“Massachusetts … became center stage for the liberal social agenda,” he told the Conservative Political Action Conference in 2007. “Sort of San Francisco East, Nancy Pelosi style.”

In his second run for the White House, Romney is portraying his home state — and his own role in it — in a different light. Rather than showcase how hard he fought against liberal Massachusetts politicians, he cites how he was able to work with them to get things done. Rather than disparage the state’s political culture, he holds it up as an example of how bipartisanship should be conducted in Washington — and why he should be the one to make it happen.

“I was in some respects lucky that my Legislature was so overwhelmingly Democrat, that it taught me some lessons in how to work with people across the aisle,” he told business leaders last week in Treynor, Iowa. “I recognized from Day One, I’m not going to get anything done unless I have positive personal relationships with the leadership on the other side of the aisle.”

The strategy appears to be aimed at the general election, as a way to cast President Obama as an out-of-touch politician who was unable to deliver on promises of healing a partisan country. But it also has deep risks, particularly in campaigning against Governor Rick Perry of Texas, who has built himself up as a brash conservative, titled his recent book, “Fed Up!,” and portrayed Romney as someone willing to compromise away his principles.

The Tea Party has also built its brand on an unwillingness to compromise — most recently on a congressional deal to raise the country’s debt ceiling — and is unlikely to look favorably on a candidate preaching the merits of working together.

“Leaders ((are successful)) not by attacking their opposition but by finding common ground where principles are shared,” Romney said at an August town hall meeting in Berlin, N.H.

“Because you see, in our nation, Democrats love America, too. I’m a Republican, I love America. Democrats love America. We need to find places where we can agree and work together to help America.”

Romney advisers note that the approach on bipartisanship does contrast with Perry, who boasts about his state-level governing successes but has not had to contend with strong partisan opposition to get things done.

But Romney’s campaign is far more focused on the contrasts with Obama, trying to cast the incumbent as both ineffective at getting things done and as being divisive while trying.

“It’s meant to contrast himself not so much with Perry but with Obama,” said a senior adviser to Romney. “Obama is a highly partisan political figure. If you want an example of their differing styles in how to achieve consensus, just look at healthcare. Look at how Mitt worked to achieve consensus in Massachusetts, and how Obama rammed his legislation down the throat of Congress and polarized the country.”

The Obama administration often points out that it has spent years trying to achieve consensus - on healthcare and other issues - but Republicans have been unwilling to bend, at times leaving the negotiating table altogether.

On the campaign trail, Romney often talks about the relationship between President Ronald Reagan and House Speaker Thomas P. O’Neill Jr. as an example of how the wheels of government should turn.

The former Massachusetts governor touts the weekly leadership meetings he held with the Senate president and House speaker - and how most Mondays he would travel down the hallways of the Massachusetts State House to their offices, rather than requesting that they come to his “because I’m the governor.”

“We had snacks and refreshments,” Romney told a crowd gathered for a town hall last month in Miami. “And then we talked about the challenges the state faced.”

He mentions personal dinners with them and their wives. He brings up the tale of going to their houses on a Sunday to discuss his passion for healthcare reform. (He does this less frequently, given that healthcare is a problematic issue for him in the GOP primary.)

“We have such a broken Washington today that even where there is common ground people won’t come together because they don’t want someone else to have a victory,” Romney said. “In our state we were fortunate enough that when we found common ground, we didn’t care too much about who got the credit.”

What he left unsaid was that when he staged press conferences, he frequently sought credit. During the healthcare bill signing, Romney was front and center of a well-orchestrated event at Faneuil Hall.

It is all part of a tweaking of the Bay State story he tells to a national audience. In the lead-up to the 2008 campaign, he suggested that he was not part of the Massachusetts political culture.

Oftentimes he went further than just casting himself as a “red speck in a blue state,” and disparaged aspects of Massachusetts.

“I was once campaigning once in one very poor neighborhood just outside of Boston when a person came up to me and said: ‘Hey, Mr. Romney. What are you doing here? This is Kennedy country,’” Romney recounted in a 2007 speech to conservatives. “I looked around, and there were a lot of empty stores and boarded-up windows, and I said, ‘Yes, it looks like Kennedy country.’”

He also mentioned his opposition to gay marriage and cloning human embryos for research. “I have stood in the center of the battlefield on every major social issue,” he said. “I fought to preserve our traditional values and to protect the sanctity of life.”

Romney still jokes of the Bay State, telling a crowd last week in Sioux City, Iowa, that, “had I known that I was going to get involved in politics, I’m not sure I would have chosen Massachusetts as the place to do so, as a Republican.” He gets chuckles when he mentions that he’s from a state where, “there are a few Democrats, you may have heard.”

But rather than distance himself from the state, he even told the Des Moines Register last week that he could win Massachusetts in a general election.

“I can’t guarantee I’ll be able to get everything done I want to get done,” Romney said last week in Iowa. “But I can guarantee that I’ll work hard as a leader to work with people on both sides of the aisle and find common ground where our principles are not broken or twisted or bent - but instead where we live by the principles of love and affection for America, and getting America strong again.”