Republican Robert L. Ehrlich Jr. capitalized on frustrations with the state budget deficit and more than three decades of Democratic control to defeat Democrat Kathleen Kennedy Townsend in Tuesday's Maryland gubernatorial race, according to an Election Day poll by The Washington Post.

The poll suggested that Democrat Kathleen Kennedy Townsend's defeat on Tuesday may have come, in part, from an unexpected source: white women, who voted on Tuesday in disproportionately large numbers for Ehrlich.

Ehrlich held a 23 percentage point lead among white women, claiming 61 percent of their vote compared with 38 percent for Townsend. In the past two governor's races, white women split their vote equally between the Democratic and Republican contenders.

The survey also found that Ehrlich managed to hold on to virtually all his Republican base, in sharp contrast to 1998 and 1994 when GOP partisans strayed in far larger numbers.

While preelection speculation had focused on black turnout, it was Ehrlich's support among whites, including a 38-point lead among white men, that enabled him to trump Townsend's overwhelming support among African Americans.

More than six in 10 whites voters supported Ehrlich, a larger proportion than voted for Republican Ellen R. Sauerbrey for governor in either 1998 or 1994, according to exit polls.

According to the Post poll, Townsend claimed nearly nine out of 10 black votes, equaling Glendening's performance in 1998 and 1994.

One thing was clear in Tuesday's vote: Many Maryland voters were dissatisfied with Gov. Parris N. Glendening (D) and were anxious for a change when they went to the polls.

Nearly half -- 47 percent -- said Democrats had controlled state government for too long, including one in five Democrats. But 42 percent thought Democrats deserved to continue in power, mirroring Maryland's sharply divided electorate.

Among those who said Democrats should continue to be in charge, more than eight in 10 voted for Townsend. But among those who said it was time for a change, eight in 10 voted for Ehrlich.

"I'm particularly concerned about the environment, education and gun control," said Sondra Bechhoefer, 57, a homemaker who lives in Bethesda and voted for Townsend. "My assumption is that she will continue to support the policies the current administration is supporting, which is what we want."

Robanne Palmer, 36, a homemaker from Elkton, disagrees. Ehrlich "would be a wonderful change. If the Republicans screw up, we screw up. But give us a chance. We haven't had a Republican in office in so long."

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

Maryland's $1.7 billion budget deficit, education and the economy led the list of voters' concerns, the survey found.

Among those who named the budget deficit as their top issue, nine in 10 voted for Ehrlich, while three in four who cited education as their top concern supported Townsend. The two split the vote among Maryland residents who named the economy and jobs as their top voting issues.

Like more than four in 10 Ehrlich voters, Nathan Walowitz, 41, a marketing executive who lives in Owings Mills, said the budget deficit was the issue that determined his vote.

"I'm a registered Democrat, but there doesn't seem to be a lot of leadership in the current administration," Walowitz said. "Look at the state budget deficit. This has been looming for a long time, but nothing was done to address it in a timely manner."

Walowitz didn't blame Townsend for the problems he sees in Annapolis.

"She was just a fellow traveler. But I just didn't see that she exhibited the leadership skills or attention to detail that we need to lead us over the next four years."

Ehrlich benefited from nearly unanimous support from Republicans and from a large number of crossover Democratic votes, the survey found. He claimed 22 percent of the votes cast by Democrats, slightly better than the GOP showing four years ago. At the same time, Townsend received fewer than eight in 10 Democratic votes, or slightly fewer than Glendening claimed in 1998.

Even some of Townsend's supporters acknowledged after they voted that they were less than enthusiastic about their candidate.

"I wasn't very excited about Kathleen Kennedy Townsend, but I tend to the Democratic Party and I don't like the idea of state-sponsored gambling, that kind of turned me off to Ehrlich," said Patricia Engler, 39, who works for the U.S. Department of Agriculture. "And I also think there are some environmental programs I'd like to see keep going."

Ehrlich also managed to claim nearly all of the votes of those who supported Sauerbrey four years ago. But one in five voters who supported Glendening in 1998 abandoned Townsend, his lieutenant governor, the Post survey found.

Samuel Itscoitz, 62, of Potomac, describes himself as a moderate Democrat who thinks Glendening has done a good job as governor. Up until Monday, he had planned to support Townsend. Instead, he voted for Ehrlich.

"It was more of a vote against Kathleen Kennedy Townsend than a vote for Ehrlich," Itscoitz said. "I am a physician, and a couple of issues came up, specifically tort reform -- capping malpractice awards for pain and suffering," which the doctor supports. "The second was nurse practitioners being able to practice independently, and not with a physician," which he opposes.

On Monday, he learned that Ehrlich favored malpractice caps and opposed independent practice by nurse practioners. And just as telling, he found out that "Kathleen Kennedy Townsend was unwilling to take a position on both those issues," he said.

The gender gap opened wide on Tuesday.

Men voted for Ehrlich 57 percent to 42 percent, while women favored Townsend 52 percent to 47 percent -- a 20-point gap. That's identical to the size of the gender gap in 1998, when men split equally between Sauerbrey and 60 percent of all women voted for Glendening. Four years earlier, the gap was even larger: 26 points.

GOP supporters gather around Gov. Robert L. Ehrlich Jr. as he thanks them for backing his ticket.GOP ticket mates Robert H. Ehrlich Jr. and Michael S. Steele exchange smiles on a victorious night for the candidates.