Yet two months after O'Malley, a Democrat, sailed to victory, McDonnell showed up in Annapolis to attend the inauguration. Virginia's governor even praised the man he worked to defeat, calling O'Malley "a very smart guy" who "obviously had a record of accomplishments."
Despite their deep ideological differences, occasional sparring on national television and the natural competition between the two neighboring states, the governors have been able to maintain a working relationship that rarely erupts in public spats. Advocates for various regional issues say their mutual respect has smoothed the way for agreements on transportation, emergency preparedness, crime reduction and Chesapeake Bay restoration.
The partisan pressure dividing them, however, is about to kick up a notch.
Last week, O'Malley was elected to head the Democratic Governors Association for a second year. McDonnell won his own full term as chairman of the Republican Governors Association two weeks ago, after filling out the end of Texas Gov. Rick Perry's tenure.
That means each man will lead his party's campaign organization going into 2012, when 11 gubernatorial elections are scheduled. Unlike this year, a good portion of those seats are considered highly competitive. Adding to the intrigue: O'Malley and McDonnell are both on their party's short list for national office and will want to impress party elders.
Jennifer Duffy with the Cook Political Report said it "does seem a little odd" that the two neighboring governors will be competing national voices for their parties in 2012. But she said it is "helpful" for the relationship that neither man is up for election this year — in fact, both are term-limited.
"They both have to live on their records, no matter what they do next," Duffy said. "It is in their best interest to keep [a cooperative relationship] going. It is also in the states' best interests, and both of them see that trumps politics."
In an interview, O'Malley described his relationship with McDonnell as "professional" and "collaborative."
"We have obvious differences of party and philosophy," O'Malley said. "But when it comes to governing, I try to cooperate whenever possible and I think that is what he tries to do."
McDonnell echoed the sentiment: "We are Potomac River border friends," he said in an interview. "We have a respect for each other. And we have some friendly competition."
McDonnell said that he and O'Malley have spoken about how their national roles could affect their interaction on regional issues.
"We will be out there competing and explaining our different vision for America," he said. "But we do know that on the issues that are important to the people of our state … we are going to be working together. I think we've already shown that."
The governors' cooperation hasn't produced a headline-grabbing accord such as the one between O'Malley and McDonnell's predecessor, Democratic Gov. Tim Kaine. Those two stood side-by-side on the banks of the Potomac River in 2008 to announce a ban on harvesting blue crabs in winter months, a development that is credited with a rebound in the population.
Still, O'Malley and McDonnell have produced concrete results, including an array of agreements centered on the health of the Chesapeake Bay. They hammered out consistent rules for how to determine when an oyster bed is considered restored. They've agreed on methods to monitor Bay water quality.
And, though the initial blue crab agreement was made with McDonnell's predecessor, environmental advocates and Maryland officials were relieved that Virginia's new Republican administration did not attempt to weaken to it.
"We get pressure every year to extend the harvest season," said Frank W. Dawson III, an assistant secretary at the Maryland Department of Natural Resources. "We're pleased that they have had the fortitude to stick with what we think is a really science-based decision."
Another high-profile display of cooperation occurs at regular meetings between McDonnell, O'Malley and Washington Mayor Vincent Gray on ways to improve Metro safety in the aftermath of a June 2009 Red Line accident that killed nine people.
The leaders agreed in broad strokes that the Metro system's governance structure needs to be overhauled and later this month are expected to jointly release a report with specific reforms. Those findings likely are going to require O'Malley and McDonnell to push bills through their respective state legislatures.
"They don't have to be dragged to the table to meet with each other to talk about the issues," said James C. Dinegar, CEO and president of the Greater Washington Board of Trade, which has been coordinating the Metro meetings. "They don't have to hold their nose to sit with each other."
Ann Swanson, director of the Chesapeake Bay Commission, recalled watching the two men grapple with new federal clean water requirements that will force both states to spend billions on upgrades to treatment plants and waste water systems.
McDonnell made a forceful case for more federal assistance, and O'Malley rose to support him, Swanson said. "I think that they have a relationship that would not be unlike sports team rivals," Swanson said. "They certainly respect each other for what they do," she said.
Their cooperation — and ability to present a united front — has led the federal government to ease off on some rules that both states said would be difficult to implement, she said.
Regional issues aside, the two men would have much in their past to discuss over a pint of Guinness. O'Malley, 48, and McDonnell, 57, both come from Irish Catholic families and graduated from Catholic universities (O'Malley from Catholic University and McDonnell from Notre Dame). Each man has a law degree and their resumes both include stints as prosecutors and time working as staffers in national politics.
O'Malley was first elected to office in 1991, when he became a member of Baltimore's City Council. That year McDonnell too won his first election, becoming a member of the Virginia House of Delegates. They became governor within three years of each other; O'Malley in 2007 and McDonnell in 2010.
There hasn't always been such collegiality between the Maryland and Virginia governors of opposite parties. Maryland Gov. Parris Glendening, a Democrat who was in office from 1995 to 2003, clashed with both of the Republican Virginia governors who overlapped his tenure.
Glendening says he and Virginia Gov. George F. Allen "had struggles," notably including a heated battle over a multi-state initiative to increase reforestation projects along Chesapeake Bay tributaries. Relations weren't much better when Republican Gov. James Gilmore III took over in 1998.
Despite some agreements, the friendliness between O'Malley and McDonnell evaporates when their states are competing for corporate headquarters and jobs. O'Malley lost to McDonnell in 2010 when defense contractor Northrop Grumman decided to locate in the commonwealth instead of Maryland and more recently Bechtel Power Corp. decided to move 625 jobs from Frederick to Reston, Va.
Also maddening, according to O'Malley aides, are McDonnell hints about luring Lockheed Martin from Bethesda.
"There is always competition for business," said Boyd Marcus, who was Gov. Gilmore's chief of staff. "Each governor is responsible for selling his state and making his case why we are the best."
Nationally, the two governors have already gone head-to-head on CNN's "State of the Union" program to debate President Obama's jobs bill. McDonnell called out O'Malley for using partisan rhetoric.
"Words like 'dinosaur wing' and 'extremist,' it's not helpful to the civility in our country," McDonnell said, referring to terms O'Malley often uses on national television when describing elements of the Republican Party.
"They both have to wear two hats," said Tucker Martin, McDonnell's communications director. "They will have one relationship as competing party heads and a different relationship as governors of neighboring states."
In the next 12 months, as both governors ramp up their party work, Martin predicted that their paths will cross on the hustings. "I think if that happens, they will shake hands and share a laugh," Martin said.
They'll also be watching one another carefully.
"I know my boss will have a score card, and O'Malley will have a score card," Martin said. "One of them will call the other in December 2012 and say, 'I win.'"