Within hours after Rep. Robert Ehrlich announced he was running for governor, faxes began arriving at Maryland news organizations skewering his votes on abortion, gun control and the environment.

The aim was clear -- to portray the 44-year-old Republican congressman as a right-wing extremist in a state where Democrats outnumber Republicans 2-to-1 and where Ehrlich's chief opponent could be a Kennedy.

But Ehrlich expected the attacks and began positioning himself as a political moderate long before he announced his candidacy.

Republicans have not won a race for governor in Maryland since 1966, but party leaders think they have a shot at breaking the long drought with Ehrlich, a popular campaigner who runs up big majorities in his nominally Democratic congressional district in the Baltimore suburbs.

If he wins the nomination, he will probably face Lt. Gov. Kathleen Kennedy Townsend in November. The 50-year-old daughter of Robert F. Kennedy is expected to announce her candidacy soon and is the Democratic favorite unless Baltimore Mayor Martin O'Malley enters the race. No Kennedy has ever been elected governor.

Maryland is one of 36 states holding elections for governor this year and one of 17 states in which the incumbent is not running. Democratic Gov. Parris Glendening is barred by term limits from seeking re-election.

All statewide officials in Maryland, including both U.S. senators, are Democrats. Democrats also hold three-quarters of the seats in the state Senate and in the House.

Townsend holds substantial leads over Ehrlich in early polls. Democratic officials think they can hold the seat, but acknowledge Ehrlich will run a strong race.

"He's going to be personable. He's going to have the ability to raise money," said Democratic legislator Michael Busch, a friend of Ehrlich's who will nevertheless be supporting Townsend.

"Ehrlich is not the percentage bet, but of course he has a chance. He's personable. He's articulate. He's energetic. He purports to represent moderate Republicanism," said Herbert C. Smith, a professor of political science Western Maryland College. "Kathleen's strength is among African-American voters and women. It's going to be very difficult for him to pull them away."

Republicans will not be able to criticize Townsend's voting record because, as lieutenant governor for seven years, she has not cast any votes. They intend to focus on what they say is her lack of leadership on criminal justice issues and economic development, the major areas of responsibility given to her by Glendening.

Republicans say they have asked the U.S. Justice Department to investigate problems in the Maryland juvenile justice system. While they did not mention Townsend by name at a news conference last week, they said fights, abuse by guards and a recent suicide underscored a failure by the Glendening administration.

As for Ehrlich, Democrats have plenty to look at. "I've voted probably 25,000 times" as a member of the state legislature and Congress, Ehrlich said the day he announced his candidacy.

He said it will be easy for Democrats to pick out a few of those votes and distort his positions: "They'll demonize me. They'll demagogue."

Democrats note that Ehrlich voted with the American Conservative Union 82 percent of the time and with the liberal Americans for Democratic Action just 11 percent of the time during his seven years in the House.

But Ehrlich is holding himself out as a moderate on three key issues -- abortion, gun control and the environment. His aides note that he supports mandatory background checks for gun buyers and a ban on high-capacity ammunition magazines.

On abortion, Ehrlich got identical ratings from the National Abortion and Reproductive Rights Action League and the National Right to Life Committee.

Ehrlich can also expect criticism on his environmental voting record. His rating of 21 percent in the League of Conservation Voters' 2001 scorecard was the lowest in Maryland's House delegation.

The league's Maryland affiliate said the record shows he is out of sync with Maryland voters who want clean air, clean water and open space.