For the first time in eight years, Wiley F. Mitchell Jr. is having to fight for his seat in the Virginia State Senate--with a woman who was often his ally on the Alexandria City Council.

Democrat Beverly Beidler is campaigning to wrest the 30th District from Mitchell, a Norfolk Southern railway corporation lawyer who in 1975 became Alexandria's first Republican senator in this century. Four years later, Mitchell was reelected without opposition.

Beidler concedes Mitchell is a popular legislator and not terribly far from her on major issues. But she contends that as a woman, Democrat and nonlawyer, she is more representative of the district's 130,000 residents and would be more effective in the Democratic-controlled General Assembly.

"When you're a member of the minority party, you can't really bring home the bacon," says Beidler, 54, who quit her job as a financial management adviser at the U.S. Department of Housing and Urban Development to run against Mitchell.

Mitchell disagrees. His campaign is stressing his leadership and legislative effectiveness during his eight years in Richmond--but not his Republicanism. Knocking on doors since April, he says he takes nothing for granted in a district that has historically favored a Democrat.

"I have always run full throttle," says Mitchell, 51, a native of North Carolina who moved to Alexandria 19 years ago and was elected to the Alexandria City Council in 1967. ". . . I don't know how I could run any harder than I am."

Mitchell's name recognition has been diluted by redistricting that in 1981 tacked on eight Fairfax County precincts to the 30th, whose borders used to match the Alexandria city line. The candidates from Alexandria have devoted much time to showing their faces to the more than 27,000 Fairfax residents now in the district.

"You didn't elect me, I got imposed on you by redistricting," a smiling Mitchell told constituents as he went door to door in a light rain earlier this week in the county's Bren Mar section near the western border of Alexandria.

The campaign has to date been friendly and not particularly visible, though Mitchell street signs are now starting to show up. Beidler says that political signs mar the landscape and that she will not be posting until later in the campaign.

The candidates know each other well from having served on the council for two years and used to run into one another frequently while exercising at T.C. Williams High School in Alexandria.

Mitchell and Beidler share many common goals: more money for Metro, more money for public schools, ratification of the Equal Rights Amendment. But there are differences.

Mitchell backs right-to-work laws, which bar closed union shops; Beidler says she would vote against them. Mitchell opposes allowing public funds to be used for voluntary abortions; Beidler says that poor women deserve the same rights as the rich, who can pay for abortions themselves.

Mitchell was the Republicans' obvious choice for the nomination. In Richmond, he is known as a personable man, an exacting drafter who reads the fine print in other people's bills. "He does his homework," says Sen. Hunter B. Andrews (D-Hampton), who is the Senate majority leader.

Mitchell says he is proof that Beidler is wrong in claiming that one must be with the majority party to make things happen. In the 1983 session, Mitchell says, he introduced 14 bills. One was defeated, one was rejected in committee, another was withdrawn and the remaining twelve passed the Senate. Of those twelve, nine went on to pass the House, he says.

Through steps such as backing proposals to make Dr. Martin Luther King's birthday a state holiday and attending black community meetings, Mitchell has kept good working relations with Alexandria's minority voters, black leaders say. Blacks make up about a quarter of the city's population. The 30th District has 59,000 registered voters, 46,000 of whom live in Alexandria.

"The only bad feature of Wiley for blacks in Alexandria is that he's a Republican," says Nelson E. Greene, a black Democrat and a former member of the City Council, "Greene predicted that, based on traditional voting patterns, most blacks would support the Democratic candidate.

Beidler was elected to the council in 1973 and served two terms before deciding not to seek a third term, citing financial pressure and need for "new blood" in the council. She was chairman of the Northern Virginia Transportation Commission and the Metropolitan Washington League of Women Voters, and served on the Alexandria Human Relations Council.

During her council service she was a supporter of Metro and minority rights. She opposed I-66. In person, her style is vastly different from Mitchell's: more introspection and less repartee.

"She was known as a diligent, very serious council person who gave her voters everything they could expect," said Vice Mayor James Moran, a Democrat.

Beidler was nominated for the state Senate at a mass meeting in May and began campaigning almost immediately. Lt. Gov. Richard Davis has come to town to raise money for her. The city's Democratic leaders have turned out faithfully.

Her campaign has spent between $8,000 and $10,000, campaign workers estimate. Mitchell has been spending at twice that rate, coming in so far at something under $20,000, according to his campaign staff.

Mitchell has received more endorsements: the Education Association of Alexandria, the Fairfax Education Association, the Virginia Education Association, the United Mine Workers, the United Transportation Union, the Virginia chapter of the National Organization for Women and the Virginia Women's Political Caucus. Beidler said she has been endorsed by the AFL-CIO's Northern Virginia Committee on Political Education.