Thomas Moss, the flamboyant and powerful majority leader of Virginia's House of Delegates, isn't used to opposition on his home turf in this heavily Democratic seaport city. Certainly not from a fellow Democratic legislator and even less from an elegant civic activist and arts patron who only last year campaigned as his running-mate.

So when 48-year-old Edythe Harrison last spring moved across a newly drawn political boundary to challenge Moss in a head-to-head primary battle, he and the rest of Virginia's political establishment were stunned. But that was only the beginning.

The race, which winds up Tuesday, has turned into a nasty confrontation between the consummate male insider, armed with the power and influence of seniority, and the feisty female outsider running a campaign of sustained outrage at the closed world of Richmond's "old boy network."

Forces from around the state have weighed in, raising the stakes in a contest that some predict will cost a combined total of $80,000 or more. The political action committees have pitched in for Moss. Womens' groups, critical of Moss' treatment of women's issues, are helping Harrison with cash and volunteers.

"Tom Moss is an enemy of all women in this state," says Jean Crawford, legislative coordinator for the Virginia chapter of the national Organization of Women. "It would be nice to have Edie back in the House, but this is also definitely anti-Tom."

In some cases the lines have crossed. The Virginia Education Association, a powerful political agent, has endorsed Moss but because he never came out in support of the Equal Rights Amendment, the VEA is barred from actually contributing money to his campaign.

Still, VEA lobbyist Dick Pulley has made a point of personally campaigning for Moss. "I consider this an extremely important race," said Pulley. "Tom Moss is an important individual in the House of Delegates."

What has made the challenge to Moss feasible this year are Virginia's new political lines, drawn to create 100 single-member districts around the state. Here in the Tidewater region, these replaced multi-member districts which for years had allowed ruling Democrats to pool their resources with a single slate. For Moss and a handful of other powerful urban legislators, this has meant relearning what it's like to go out and campaign.

Like Moss, Del. Theodore Morrison, a Newport News Democrat in line to become House Finance Committee chairman next session, found himself battling an unaccustomed challenge within his party. He won at an unusual mass meeting Thursday, but at no point could Morrison, one of Virginia's most powerful legislators, take his victory over a former Newport News mayor for granted.

Of all the potential upsets, Moss' is the one that has drawn the most attention. Seen by many as the next speaker of the House, the 54-year-old attorney came to the legislature 17 years ago as a reform candidate running against the established Byrd machine. Since then, Moss, known for his flip and rambunctuous manner, has accumulated considerable power, a reputation as a skillful legislator -- and a fair share of enemies.

From the day she handed out her first "Toss Moss" button, Harrison has never let up. With a ferocity perhaps unexpected in a former president of the Virginia Opera Association, the Detroit native has attacked her opponent at every turn -- airing old conflict of interest charges involving his practice before the Alcoholic Beverage Control Commission and denouncing him for his insensitivity to ethics reform and the needs of his constituents back home.

In an early campaign letter, Harrison described the "Richmond two-step" as a dance, held behind closed doors, between a handful of lawmakers and the specical interests. "Nobody, not even Fred Astaire, could dance this Richmond two-step as smoothly as Norfolk's Tom Moss," said Harrison, who was first elected to the legislature in 1979.

She has also zeroed in on Moss as a symbol of what she and other women activists have long viewed as the male chauvinist bias of the Virginia legislature. "Women in Virginia are appalled at his behavior both inside the House and outside the House," she said recently.

"Tom Moss represents the problem and I represent the solution," she says with unabashed self-confidance.

Moss concedes he was caught off guard by his opponent's "surprise attack." But it didn't take him long to recoup. Armed with hefty contributions from labor, builders, bankers, lawyers and other groups, he has launched an aggressive campaign of his own--offering himself as an effective legislator with experience and clout and dismissing Harrison as a carpetbagger, a turncoat and an inept lawmaker. At times, Moss refers to her as "Edie Amin."

In an interview, Moss made much of his old alliance with Harrison. "I've done everything that lady has ever asked me to," he said. "I helped her with the only bill she ever got through."

"These so-called conflicts of interests never bothered her before when we ran together," said Moss. "And on the 3,000 votes we cast last session, she voted with me 97 percent of the time--which means that if I'm voting special interests, she must be too."

In a critical development several weeks ago, Moss won the so-called Goldenrod endorsement from Norfolk's influential black leaders, which is expected to carry considerable weight among blacks, who comprise 25 percent of the 88th District.

That endorsement and a campaign fund of more than $30,000 as of last week (compared to Harrison's $20,000) have prompted most observers to give Moss the edge in tomorrow's vote. But Harrison insists that her support is less visible because of Moss' power. "I have a feeling this is one of those elections where people can't wait to get into the voting booth," she said, "People are afraid of being intimidated--Tom is calling in so many old favors."

The difference in the two candidates' styles was apparent last week at an annual picnic of the Norfolk Chamber of Commerce. Moss, accompanied by a handful of campaign workers, strolled through the crowds, dressed in a short-sleeved shirt, slapping lapel stickers on everyone he met. Businessmen stopped him, reminding him of their support. "She should keep to the opera," joked one about his opponent.

Harrison, neatly dressed in a yellow dress and white stockings, came with only her husband, Sidney. She had one sticker to give away and that was the one she was wearing. Running into a woman who had already been stopped by Moss, Harrison peeled off her opponent's green sticker. "I can't bear to see a nice woman wear one of these," she said, tossing it on the ground.

The two have yet to hold a joint appearance in the district, a collection of upper-middle-class neighborhoods interspersed with small pockets of black and blue-collar areas. Moss has refused all requests, arguing that Harrison is not a real resident.

Harrison, whose campaign headquarters are in her large house across the line in the 86th district, claims she was a victim of last-minute gerrymandering by Moss to protect another Norfolk legislator. The final map--which she says she saw for the first time the day it was approved by the General Assembly--put her in a district which she claims was deliberately weighted against her.

With that, she rented an apartment several blocks away in the 88th where she has outpolled Moss in past primary elections. She makes no apologies for the move: "I moved fair and square," she says. "He took my precincts."

The bitterness of the race has upset some local residents, many of whom had supported both Moss and Harrison last year. "It's the first time we've had this kind of contest," said Kelly Scott, a Norfolk bank officer and district resident. "I think in this case, people's final judgement will be very personal."