In District 20, one of Montgomery County's most compact and densely Democratic districts, the primary election fight in the state Senate race has already proved to be unpleasant and costly.

Incumbent Democrat Ida G. Ruben, a veteran lawmaker who first won her Senate seat four years ago by a margin of 64 votes, has raised more than $100,000 in her reelection bid, the most among legislative contenders in the county. Four years ago, she waged the most expensive state legislative fight in county history.

Ruben, 61, is challenged by Ira Lechner, a former Virginia state legislator and wealthy lawyer who has lent his campaign all but about $3,000 of his $70,000 total and has questioned Ruben's leadership and ability to get along with others.

Although Ruben proudly points to her 16 years in the statehouse, including a dozen as delegate, and her work on behalf of highway safety, child support and adult protective services, Lechner insists that his opponent is "not a household name." Ruben, who heads the county's Senate delegation, counters that Lechner, 56, is trying to "buy a seat" in District 20, which includes Silver Spring, White Oak and Takoma Park.

"He's running a regular U.S. Senate campaign in my district," Ruben said. "He really doesn't have anything to hit me on. His experience doesn't mean he can deal with Annapolis. I certainly know Annapolis like the back of my hand."

A third Democratic Senate candidate, Robert Bates, who finished last in the 1986 race, has been roundly criticized for making a campaign issue out of the drug conviction last year of Ruben's 34-year-old son. Bates, 63, a Silver Spring lawyer, said he is running against "bossism and slate-making in the county," noting that Ruben is supported by County Executive Sidney Kramer, who has organized a powerful slate of incumbents to run together in the Sept. 11 Democratic primary. Bates has raised $2,600, all of it his own money.

A Republican candidate, Thomas Falcinelli of Silver Spring, will face the primary winner in the Nov. 6 general election.

Otherwise in District 20, the race for three seats in the House of Delegates will be settled in September; there are no Republican challengers. The five candidates are Robert G. Berger, 36, a newspaper columnist and lawyer who narrowly lost in the 1986 primary; Dana Lee Dembrow, 36, a lawyer who is seeking a second term and has been involved in a running feud with Ruben; Peter Franchot, 42, a lawyer who is also running for a second term; Sheila Ellis Hixson, 47, a former employee of the Democratic National Committee and a delegate since 1976, who is known as "the queen of sludge" for her environmental work; and real estate agent Diane Kirchenbauer, 46, a former delegate who lost the Senate race to Ruben in 1986.

While disagreeing on who is the best candidate for the job, the contenders here do agree on the central issues in District 20, which has about 30,000 registered Democrats and is described as one of the most diverse districts in Montgomery County.

All the Democratic candidates in the Senate and house races say they support abortion rights. All agree that residents in District 20 are concerned about transportation, traffic congestion, high property taxes and the environment.

"The number one issue in District 20 is quality of life," said Franchot, who, like the other candidates, has visited hundreds of homes in recent weeks. "It revolves a lot around environmental issues: safe drinking water, recycling, quality of air and water. The abortion issue is important, but I would rank the environment significantly higher in people's minds."

On a less lofty level, Ruben's opponents have criticized what they see as her difficulty in working with Dembrow as a sign of larger problems in cooperation.

Ruben and Dembrow, once opponents in a delegate's race, have not been on speaking terms for four years, and each accuses the other of petty tactics in the conflict. Dembrow, who fashions himself as an outsider, once reported Ruben to authorities for failing to include an authority line on campaign materials; she said authorities had given her the wrong instructions and paid a $250 fine. In her briefcase, Ruben carries copies of documents showing that Dembrow has voted against many of her bills that she says would benefit the district. Recently, Dembrow reported her for putting up her campaign signs before she was supposed to.

Said Ruben: "If he grew up, maybe I could deal with him. He thinks he can go around doing anything he wants, and you're supposed to take it."

Said Dembrow: "I think she feels threatened by me. I almost beat her in 1982 and I ran against her slate in 1986. There's a paranoia."

Lechner represented Arlington and Alexandria in the Virginia legislature from 1974 to 1978, was defeated by Charles Robb in the 1977 lieutenant governor's race and lost a bid in 1982 for Congress from Virginia. He said the problems between Ruben and Dembrow give the wrong message to other legislators. "The problem that arises," he said, "is that other senators in the legislature, when they know you don't have your own house in order, are not going to cut you slack and work with you, when they know you're not working as a team. We need a certain kind of leader and Ida's not that kind."

Lechner's opponents have charged that his somewhat recent arrival in the county -- he moved to Silver Spring about five years ago -- suggests he had political office in mind when he made the move.

"I think most of the people know me and they've got something tried and true, so why bring in somebody new?" said Ruben, who is married to Circuit Court Judge L. Leonard Ruben, from whom she inherited her first delegate's seat.

She said, "I stand on my record," which includes successful bills for random inspections of used trucks, mandatory child-support payments and protection of the rights of adults who are not able to care for themselves. She also serves on the Budget and Taxation Committee, which she describes as "the most powerful in the state."

Lechner has promoted himself as "a reform candidate," pledging that he would not accept money from political action committees and stressing that he is "not a product of the machine."

In the House of Delegate race:

Berger, a telecommunications lawyer who grew up in Silver Spring, charges that "there has been no leadership on the crucial issues of the district -- no leadership on effective transportation planning along Route 29, on insurance reform, and on protecting a woman's right to choose, which I think are the three most important issues." He is the author of a political column featured in 11 small newspapers around the state.

Dembrow, in his first term, said he had the best attendance record in Annapolis of any Montgomery delegate, and also one of the best records of successful bills enacted, including one that outlawed telephone solicitations using recorded messages. Calling himself a progressive Democrat and a hard worker, Dembrow said he would concentrate next term on public education and the environment.

Franchot is a member of the House Appropriations subcommittee, "where the action is in the state legislature," he said, and has been a leader in gun control legislation and in preserving money for the proposed light-rail service between Bethesda and Silver Spring.

Hixson, who is seeking her fourth term, served for 10 years on the House environmental and health committee and is head of the Federal-State Relations Committee, which oversees all federal funding that comes into the state.

Kirchenbauer, a real estate agent, is trying to regain the House seat that she gave up four years ago when she decided to run for the open Senate seat won by Ruben. "I had begun a good record on environmental issues and consumer protection issues," she said. "I'd like to return and do it again."