The election season in Maryland has been dominated by one of the tightest governor's races in the nation, an unexpectedly competitive and vitriolic contest between Democrat Kathleen Kennedy Townsend and Republican Robert L. Ehrlich Jr.

If Ehrlich were to win, he would become a certifiable GOP hero, the first Republican to claim the governor's mansion in Annapolis since Spiro T. Agnew in 1966.

At the same time, Democrats are hoping to claim two congressional seats long held by GOP incumbents and are pouring money into the races in the suburbs of Washington and Baltimore.

Incumbent Constance A. Morella (R) faces a tough battle with state Sen. Chris Van Hollen (D) in a House district that includes Montgomery County and a sliver of Prince George's.

And in the Baltimore County seat that Ehrlich gave up to run for governor, County Executive C.A. Dutch Ruppersberger (D) faces former representative Helen Delich Bentley (R) in a contest that is also expected to be close. The state's congressional delegation is evenly split, 4-4, between Republicans and Democrats. Six are expected to win easy reelection.

While the congressional and governor's races have drawn the most money and attention in this fall's election, Republicans are coming on strong in a number of races in this heavily Democratic state. There is little chance that Republicans will force the sort of massive turnover that allowed Virginia Republicans to claim control of the State House in Richmond a few years back. But the Maryland GOP is hoping to make small gains Nov. 5 in the state Senate and the House of Delegates.

"We're basically running a throw-the-bums-out-type campaign," said Paul Ellington, director of the Maryland GOP. "We succeed when that is the message. And every time we turn around, there's something new to make that message resonate."

Chief on the Republicans' list of campaign issues is a $400 million deficit in this year's state budget and a $1.3 billion shortfall projected for next year. A poll by Gonzales/Arscott Research & Communications Inc. shows that Maryland voters consider the looming budget crisis the most important issue of the fall campaign, ahead even of education, and Republicans are arguing that Democratic state leaders, primarily Gov. Parris N. Glendening, are to blame.

Next in line on the GOP hit list is "the culture of corruption" in Annapolis, a phrase coined by the federal judge who sentenced one of the state's wealthiest lobbyists, Gerard E. Evans, to prison for bilking clients for thousands of dollars.

This summer, as Republicans girded for battle in a state where registered Democrats outnumber them 2 to 1, Democrats offered a bonanza of material on the ethics front. Evans, now out of prison, announced that he would return to lobbying. Senate President Thomas V. Mike Miller Jr. (D-Prince George's) and other Democratic lawmakers were chastised by a special prosecutor and their own ethics committee for contacting judges on the state's highest court while the court was reviewing a new legislative redistricting plan. And House Speaker Casper R. Taylor Jr. (D-Allegany) drew fire for having a state trooper accompany an aide to a political event.

Miller and Taylor were cleared of criminal wrongdoing. But Ehrlich is using the Democrats' missteps to accuse Townsend, the state's lieutenant governor, of presiding over a capital where Democratic leaders have grown arrogant after 36 years of one-party rule.

Some Republican state House candidates are beating the same drum. In Montgomery County, for example, Republican Tom Devor created a Web site at www.silentbrian.com that accuses Sen. Brian E. Frosh (D) of failing to speak up against "the corrupt leadership in Annapolis."

State GOP leader Ellington predicted that the party could pick up three seats in the Senate and as many as 10 in the House, the first GOP gains since 1994.

The party is waging a major effort, for example, to unseat Taylor in a district in conservative Western Maryland that became more Republican with redistricting. Taylor faces a local businessman, LeRoy Ellsworth Myers Jr., who has rallied support by accusing Taylor of helping Glendening win passage of far-reaching gun control laws.

The most closely watched state Senate races are on the Upper Shore, where millionaire environmentalist E.J. Pipkin (R) is challenging Sen. Walter M. Baker (D-Cecil), chairman of the Judicial Proceedings Committee; in Anne Arundel County, where Del. Janet Greenip (R) is challenging Sen. Robert R. Neall (D); and in Baltimore County, where Del. Martha S. Klima (R) faces Democrat Jim Brochin in a seat left open by redistricting.

Meanwhile, Democrats are hoping to take a few seats back: In Baltimore County, Del. Diane DeCarlo (D) is challenging state Sen. Andrew P. Harris (R); in Howard County, County Council member C. Vernon Gray (D) is running against Sen. Sandra B. Schrader (R); and in Frederick County, Del. C. Sue Hecht is trying to unseat Sen. Alex X. Mooney (R).

While Ehrlich is running neck and neck with Townsend, Republicans have nominated far less competitive candidates for Maryland's two other statewide offices.

Attorney General J. Joseph Curran Jr. (D) is expected to handily defeat Republican Edwin MacVaugh, a Towson attorney, in a race that has focused on Curran's strict interpretation of federal gun laws. And Comptroller William Donald Schaefer (D) faces Republican Gene Zarwell, a GOP activist from Gambrills who has failed to garner strong support even from his own party.

In Annapolis, Maryland's GOP leadership is hoping to pick up as many as three seats in the state Senate and 10 in the House.