Maryland voters rejected attempts by Democrat Kathleen Kennedy Townsend to cast Republican Robert L. Ehrlich Jr. as too conservative and hopelessly out of step with the more moderate views of state residents, according to an Election Day poll conducted by The Washington Post.

The survey suggests that Ehrlich's strong showing among moderates and political independents was critical to his success in ending more than three decades of Democratic control in Annapolis. Overcoming a 2 to 1 Democratic registration edge, Ehrlich achieved a 51 percent to 48 percent victory over Townsend.

Despite the ubiquitous Townsend TV commercial that featured voters repeating the mantra, "He's not a moderate," Ehrlich claimed 50 percent of the votes cast by self-described political moderates, while Townsend, the lieutenant governor, received 47 percent, the poll found.

"He's a moderate, for the most part," said Debra Boland, 49, a child care provider in Bel Air who describes herself as a political moderate and voted for Ehrlich. "He has real concern for the public, for health care needs and our educational needs, but he's more conservative on economic issues" than Townsend.

The Republican collected an even larger share of the vote from independents: Fifty-five percent of those with no firm ties to either party favored Ehrlich.

"I was very tired of the Glendening administration," said Cheryl Hargis, 51, who owns a tutoring business, lives in Germantown and doesn't identify closely with either political party. "I never trusted him. He tends to be corrupt. He's run up a huge deficit. It's not that I necessarily want the budget balanced, but I'd like to see someone as governor who will cut taxes, reduce spending and cut waste. A lot of things could be managed more wisely."

A total of 986 Maryland residents who were first interviewed in a Post survey conducted two weeks ago were interviewed again on Tuesday for this poll. The margin of sampling error for the overall results is plus or minus 3 percentage points.

Tuesday's vote marked the first time in at least the last three Maryland elections that the Republican gubernatorial candidate has won a larger share of support among moderates, who comprised nearly half of Tuesday's electorate.

In 1998, Republican gubernatorial nominee Ellen R. Sauerbrey received 42 percent of the moderate vote, while 57 percent voted to reelect Democratic Gov. Parris N. Glendening, according to network exit polls. Four years earlier, Sauerbrey managed to win the support of only 39 percent of moderates, while Glendening received 61 percent.

Ehrlich's advantage over Townsend widened considerably among white moderates and independents, helping to fuel his strong overall showing among white voters in Tuesday's election, the Post survey found. Ehrlich received two-thirds of the votes of white moderates, while Townsend claimed 31 percent; among these voters, seven out of 10 men and nearly two in three women voted for Ehrlich.

Black voters, regardless of ideological leanings, overwhelmingly supported Townsend, who claimed 95 percent of the vote among black liberals, 91 percent of black moderates and 79 percent of black conservatives.

Overall, liberals, who comprised one out of four voters on Election Day, overwhelmingly supported Townsend, who is the oldest child of Robert F. Kennedy and was seen by many as the best hope of those in her generation of advancing the Kennedy political legacy.

But those votes from the left for Townsend were more than matched by voters who identified themselves as political conservatives. Among that group, which comprised about 30 percent of the electorate, Ehrlich got nine out of every 10 votes cast.

The survey also found that Ehrlich claimed 55 percent of the votes cast by self-described political independents. Again, race mattered: Two-thirds of whites with no strong partisan ties voted for Ehrlich, while a third of white Democrats abandoned their party to vote for Ehrlich. But among blacks, more than seven in 10 independents and nine out of 10 Democrats voted for Townsend.

Four years ago, Sauerbrey claimed slightly more than half -- 53 percent -- of the independent vote, and she won 57 percent of independents in 1994, according to network exit polls.