Even as voters swarmed to the polls Tuesday to elect a president, Maryland's political leaders were turning their gaze to the state's next major political showdown: the 2006 race for governor.

Baltimore Mayor Martin O'Malley, a likely candidate in 2006, broke away from his own reelection bid to cold-call Democrats in neighboring Baltimore County -- including those in Republican Gov. Robert L. Ehrlich Jr.'s home town of Arbutus -- urging them to vote.

Supporters of Montgomery County Executive Douglas M. Duncan (D) took an Election Day road trip to neighboring Prince George's County, where they passed out glossy fliers touting Duncan as a rising political star.

"I'm seriously looking at running for governor," Duncan said in an interview yesterday. "I've just been very disappointed in Ehrlich. He's brought gridlock to the state that I think is really hurting us."

Ehrlich was also focusing on the future, seizing on the election results -- with President Bush losing Maryland, but not as badly as he did four years ago -- to proclaim that the GOP "is growing, big-time" and "is here to stay."

The close of the contentious presidential contest raised the curtain on the 2006 gubernatorial race. And in many ways, party leaders said, Tuesday's results offered a preview of Maryland's political future. But each side saw something different in the numbers.

Democrats found signs of strength in the showing by Sen. Barbara A. Mikulski. Mikulski faced a well-financed opponent in Republican E.J. Pipkin, a state senator and Queen Anne's County millionaire, but she emerged with 65 percent of the vote. The margin of victory was slightly smaller than in her last two reelection bids, but larger than those of Democratic Sen. Paul S. Sarbanes.

They were encouraged that Pipkin failed to win many of the counties captured by Bush on Tuesday -- and by Ehrlich two years ago, when he became the first Republican elected Maryland governor in a generation. Pipkin didn't even win the support of all the Eastern Shore communities he represents in the state Senate, the Democrats boasted.

That was evidence, Mikulski told supporters, that Ehrlich's victory was a fluke. Maryland "has come back to the Democrats," she said. "We are a blue state, we are neon blue, we are cobalt blue, we are blue in the face."

Republicans, however, viewed gains made by Bush as a sign that the state is undergoing a slow shift to the right, despite the Democrats' 2-to-1 edge on state voter rolls.

Ehrlich called a news conference yesterday to tout Bush's numbers as proof of a "dramatic improvement" for the GOP. Moreover, the governor said, Tuesday's results signal that every future race in Maryland will turn on the mood of voters in the state's fast-growing exurbs -- such as Southern Maryland and Anne Arundel, Frederick and Howard counties.

"The era of the outer-suburban, rural Democrat is on the wane in Maryland," Ehrlich said.

The vote totals give some support to that claim. Most of the state's fastest-growing counties gave more votes to Bush this year than they did in 2000, and many of them leaned Republican in both elections. In Anne Arundel, for instance, about 26,000 more votes were cast Tuesday than four years ago, and more than 20,000 of those additional votes went to Bush. In Calvert County, 9,800 more votes were cast, and 6,800 went Republican.

Statewide, Bush's support rose by nearly 4 points, from 40 percent in 2000 to just shy of 44 percent this year.

The only counties to show sizable gains for Democrats were Montgomery and Prince George's, which already heavily favored the party.

All of this, Republican and Democratic leaders agreed, will help define the jockeying for political advantage that will dominate the next two years.

Ehrlich said his attention needs to be aimed at moderate Democrats and swing voters. At the same time, he said Republicans will pay a price if they do not appeal "across racial lines and have a more urban-friendly agenda."

To date, much of that effort has relied on Lt. Gov. Michael S. Steele, the first African American to hold statewide office in Maryland. He said yesterday that he would continue to address educational inequities facing minorities and to enhance opportunities for minority-owned businesses.

"I have to continue doing what I'm doing every day," Steele said. "It means touching all the constituencies that are part of the fabric of Maryland."

Josh White, executive director of the state Democratic Party, suggested that Republicans' efforts have "done nothing to improve their chances."

White said that the Democratic Party had not compiled specific numbers on how minorities in Maryland voted Tuesday but that he had seen signs that "we did extremely well with African American voters."

Duncan went further, saying the results signal to him that the election was "a rejection of the Republican agenda in Maryland."

Of the state's leading Democrats, Duncan has been among the most outspoken in his criticism of Ehrlich and the most transparent about his plans to take on the governor in 2006. Duncan has been holding high-dollar fundraisers, speaking at party functions across the state and aggressively courting officials in Prince George's, a jurisdiction that he believes will be crucial to winning a Democratic primary.

O'Malley has been more coy about his plans, and he tried to talk around questions about his ambitions during an interview yesterday. "Right now I'm still kind of in that post-election exhaustion phase," he said. "But we made a lot of friends around the state in the course of this campaign, and we're going to stay in touch."

Ultimately, Ehrlich said, the 2006 election will be a referendum on the job his administration has done and on his ability to live up to the promises he made on the campaign trail two years ago.

"We don't care who runs," Ehrlich said.

Baltimore Mayor Martin O'Malley, left, shown at a Democratic function in July, is a likely candidate for the party's gubernatorial nomination.