Stuck with a Republican governor for the first time in more than three decades, Maryland Democrats yesterday debated just who was to blame: Gov. Parris N. Glendening and his dismal approval ratings, or Lt. Gov. Kathleen Kennedy Townsend and her flawed campaign.

Whichever side they took, party leaders asserted that Tuesday's stunning upset by Republican Robert L. Ehrlich Jr. was not a rejection of the party's values in Maryland.

While voters agreed with Ehrlich's campaign theme that it was "time for a change" in the governor's mansion, they elected Democrats in every contested race for county executive, returned an overwhelming Democratic majority to the General Assembly and sent two new Democrats to Congress, increasing the party's share of the state's eight-member congressional delegation from four to six.

"The Democrats actually did well -- very well -- in Maryland," Glendening said.

At the same time, Ehrlich's victory will help Republicans mount a real challenge in political races across the state, Democrats said. With Ehrlich's muscular fundraising ability -- his campaign raised nearly $11 million, nearly twice that of any previous gubernatorial candidate -- some Democrats could find themselves facing well-financed Republican challengers for the first time.

"Without question, we are a two-party state now," said Montgomery County Executive Douglas M. Duncan (D).

GOP candidates have proved to be strong contenders in three consecutive governor's races, with Ellen Sauerbrey narrowly losing eight years ago. The 2006 contest promises to be just as competitive, with Duncan and Baltimore Mayor Martin O'Malley topping a list of potential rivals to Ehrlich.

One Democrat who wasn't talking yesterday was Townsend. After election returns showed her losing late Tuesday by nearly 60,000 votes, supporters broke down weeping at her election night party in a downtown Baltimore hotel.

Townsend herself seemed remarkably at peace. She delivered a gracious concession speech and then stayed up late taking calls from friends. Yesterday, she took the day off to spend time with her family. She planned to meet today with reporters on an Annapolis hiking trail.

According to Glendening, her political partner of eight years, the fault lay with Townsend's inexperienced and insular campaign advisers and their misguided attempt to run a centrist campaign that would appeal to conservative men.

In Maryland, Glendening said, Democrats win by appealing to women, liberal activists and African Americans, who together account for 55 percent of the electorate.

Townsend turned off that base in two ways, some Democrats said:On the advice of her State House chief of staff, Alan H. Fleischmann, a man who had never before run a political campaign, Townsend neglected to consult a host of Democratic activists who had expected to have a "place at the table" when decisions were made.

Many of those activists simply stopped campaigning and raising money for Townsend, feeling that they had been ignored.

Worse, Townsend chose a lifelong Republican, retired Adm. Charles R. Larson, as her running mate. He is an accomplished man, but few party leaders knew him, some Democrats said. While African American leaders cried that Townsend had taken them for granted by failing to choose a black running mate, some liberal activists were equally put off.

"Nobody knew [Larson.] He was a Republican until two weeks before she picked him. How do you trust that?" said Carl Williams, executive director of the St. Paul's Community Development Corporation in Prince George's County.

On election night, Glendening said Townsend had "the worst-run campaign in the country."

It did not help matters, he said, that she never asked him to join her on the campaign trail. "She never got traction," he said in an interview. "She never energized the base."

Tuesday night's election returns supported that view. Turnout was high, but not huge, in liberal Montgomery County, while it was depressed somewhat among liberal and black voters in Baltimore and Prince George's County, Townsend campaign officials said.

Townsend got more than 90 percent of the black votes cast, according to exit polls, but fewer voters came out than in previous years. One top Townsend campaign aide alleged dirty tricks and suppression activities by Maryland Republicans, but conceded that the Larson effect may have been partly to blame.

Other Democrats argued that Townsend lost the race in the rest of the state, where Ehrlich piled up huge margins among enthusiastic voters who turned out in droves to vote for him.

Ehrlich won 75 percent of the vote in Harford County and 80 percent in Carroll, according to state election totals. And white voters favored Ehrlich by a surprisingly large margin, particularly white women, who split 50-50 in 1998 but cast 56 percent of their ballots for Ehrlich on Tuesday, according to exit polls.

Democrats said Townsend's abysmal showing in rural Maryland resulted from a shift late in the campaign away from her centrist message as she began to aggressively woo the Democratic base.

In television ads and campaign speeches, she tried to paint Ehrlich as a right-wing zealot, an argument that never took hold. In their only televised debate, sponsored by the NAACP, she stressed affirmative action and other racial themes.

The debate proved Townsend could go toe-to-toe with Ehrlich, and her performance galvanized some Democrats. But it turned off white voters watching on television, said Senate President Thomas V. Mike Miller Jr. (D-Prince George's), who said she dropped 12 points in a statewide tracking poll.

Townsend's other problem with white and rural voters, Miller and others said, was Glendening.

The governor's popularity plummeted in recent months as the state accumulated a projected $1.7 billion shortfall. His recent divorce and marriage to his much younger deputy chief of staff did not help.

And Ehrlich did a masterful job of tying Townsend to her political partner, even on issues where she had distanced herself from Glendening, Democrats said. One that hurt: the intercounty connector highway that she pledged to build despite his opposition.

"People said, 'We trusted Glendening and he fooled us, so we're not going to trust her on the ICC,' " said Duncan, the highway's strongest advocate.

"The Glendening factor was a big, big negative, and one that she could never really shake," Duncan added. "I was appalled by his comments blaming her when he was largely to blame."