In their first appearance together on national television, Maryland Gov. Martin O’Malley (D) and Virginia Gov. Robert F. McDonnell (R) offered very different prescriptions for job growth. O’Malley emphasized investments in education and infrastructure. McDonnell said cutting spending and lifting “crushing” federal mandates are key.

They exchanged a few verbal jabs as well. McDonnell chided O’Malley for continuing to blame the country’s economic woes on President George W. Bush. O’Malley cited a statistic, later disputed by McDonnell aides, showing that Virginia lagged Maryland in job creation.

But all things considered, it was a pretty civil affair. O’Malley and McDonnell both signed off of CNN’s “State of the Union” on Sunday wearing wide grins.

Whether things stay this friendly between the neighboring governors is anyone’s guess.

With McDonnell ascending last week to chairman of the Republican Governors Association, he and O’Malley will be pitted against one another for months to come. O’Malley has led the Democratic Governors Association since December and has appeared to relish his role attacking Republicans.

Both governors have pledged not to let their partisan roles interfere with a productive working relationship. But they are certain to face calls to dial things up a few notches as the election season unfolds, analysts say.

Mark Rozell, a political scientist at George Mason University, said he was not surprised by the tone Sunday. But he predicted it would change.

“They’re going to mix it up — their roles require it,” Rozell said. “There’s absolutely no getting around that. It doesn’t mean it’s personal. . . . It doesn’t strike me as the style of either one of them.”

McDonnell, who appeared on the show from Richmond, made multiple mentions of his good working relationship with O’Malley, who joined host Candy Crowley in Washington.

“Look, Martin and I get along great working on things around the Washington area, on airports, on Metro and other things, and he’s a great Irish American, just like me,” McDonnell said before contrasting their views on federal stimulus spending.

“We’ve tried stimulus spending,” McDonnell said. “We put very little into infrastructure. We put it into a lot of other spending that didn’t create jobs, and now we’ve gone from 7.8 to 9.1 percent unemployment [nationally].”

O’Malley echoed his counterpart’s sentiments about regional cooperation in an interview with The Washington Post, saying McDonnell is “a pleasant enough person” with whom he has worked well on protection of the Chesapeake Bay and public safety.

On CNN, however, O’Malley advocated more stimulus spending, saying, “We need to invest in our infrastructure, our roads, our bridges, the things that actually get people back to work. We can do that and balance budgets at the same time, as we have on both sides of the Potomac.”

The governors did not know one another before McDonnell was elected in 2009 but have gotten to know each other since. O’Malley traveled to Richmond for McDonnell’s January 2010 inauguration. McDonnell came to Annapolis a year later when O’Malley was sworn in for a second term. The two talk by phone about once a month, they said, and participate in periodic regional meetings with the District’s mayor.

Both O’Malley and McDonnell have term limits, and they won’t be seeking reelection as governor. That makes it unlikely either will be a direct target of the other’s organization, since each association has the primary aim of electing governors from its party.

During his eight months as DGA chairman, O’Malley has criticized several GOP governors by name during speaking appearances but has steered clear of McDonnell. O’Malley’s primary targets have been candidates on the ballot this year and what he calls “a new group of tea-partying, FDR-hating Republican governors.”

In February, when O’Malley delivered his first keynote speech as DGA chairman at a Democratic dinner in Virginia, his most pointed criticism was of Chris Christie, the Republican governor of New Jersey who has become a favorite punching bag. O’Malley went after Christie again Sunday, pointing out that New Jersey’s bond rating was downgraded last week.

McDonnell was equally spirited in promoting Republican governors, noting that nine of the 10 top pro-business states in a recent ranking by Pollina Corporate Real Estate have Republican governors at the helm. Virginia was No. 1.

The biggest clash between O’Malley and McDonnell came after the broadcast Sunday and was delivered through their aides.

At the end of the first of two segments, O’Malley said Maryland ranked 20th in job creation this year, while Virginia was 44th. McDonnell did not get to respond during the broadcast.

But McDonnell’s spokesman, Tucker Martin, had plenty to say. He called the numbers, which O’Malley aides said came from the U.S. Bureau of Labor Statistics, “a nice attempt at spin.”

“Virginia’s unemployment rate is 6.1, while Maryland is over a full point higher at 7.2,” Martin said. “No amount of creative number-crunching can undo that.”

Elisabeth Smith, O’Malley’s spokeswoman at the DGA, countered by calling recent job losses in Virginia “nothing short of tragic” and providing data intended to bolster O’Malley’s contention.

“It is our hope that Gov. McDonnell learns the job-creating importance of good schools and infrastructure through his joint media appearances with Gov. O’Malley,” Smith said.

There should be plenty of opportunities. McDonnell is expected to hold his post through the end of next year. O’Malley’s tenure as chairman expires after this year’s elections, but he is widely expected to stay on for another year.