Virginia State Del. John H. Rust Jr. was turned out of office yesterday by a margin of 15 votes while two other moderate Republican legislators from Fairfax County turned aside spirited challenges from the conservative wing of their party.

Rust, first elected in 1979, lost to Stephen E. Gordy in a Republican primary that attracted 2,953 voters. Gordy, a retired Army colonel making his first bid for elected office, attacked Rust as too liberal and apparently was boosted by last-minute politicking in a local Roman Catholic church that promoted him as an anti-abortion candidate. Gordy was also helped by a group that opposed the Equal Rights Amendment, a measure Rust supported.

Incumbent legislators Robert E. Harris and James H. Dillard II easily defeated their conservative challengers, former Del. Robert L. Thoburn and Washington lobbyist Gordon S. Jones. Conservative David G. Sanders, who was championed in two Catholic churches on Sunday, handily lost to attorney James N. Burroughs for the right to challenge Dorothy S. McDiarmid, Fairfax County's senior Democratic delegate, in the Nov. 2 general elections.

Rust declined last night to pinpoint the cause of his defeat. "When you lose by 15 votes, everything has something to do with it," said Rust, a former attorney for the Fairfax City government whom many considered one of the GOP's rising stars in the legislature.

Rust said he has no plans to ask for a recount in his primary, one of seven contests held yesterday in Northern Virginia. The primaries, which nominated candidates for special one-year terms in the 100-member House of Delegates, attracted about 10 percent of eligible registered voters.

The turnout was much higher in a new Norfolk district, where House Majority Leader Thomas Moss defeated his former running mate, Del. Edythe Harrison. More than 40 percent of the district's voters turned out for the hotly contested race in which Harrison accused Moss of using his influence to help his law clients and Moss countered that Harrison was a carpetbagger.

Also nominated yesterday were Fairfax Democrats James W. Benson and Nora A. Squyres and Prince William County Republican F. Clancy McQuigg, who defeated Smith W. Young.

Election officials had predicted a low turnout in the Washington suburbs because the primary came the day after Labor Day and because few voters were aware of the primaries, all of which were held in new House districts. The 100 members of the House were ordered by a federal court to stand for election this year after the court declared an earlier redistricting plan unconstitutional.

The races included some last-minute politicking in at least two suburban Washington churches Sunday. "Your Vote Is Needed!" read the weekly bulletin at Our Lady of Good Counsel Church in Vienna. "Our moral obligation to the unborn continues . . . . Dave Sanders . . . . needs your vote so that we can take up the fight against unjust killing."

A similar insert in the church bulletin at St. Mark Church in Vienna, which has about 3,000 parishioners, urged the congregation to vote for Sanders or Gordy under the headline, "You can help stop the killings."

Gordy said he thought abortion was a key issue in his victory, because Rust had voted to allow state funding for Medicaid abortions in cases of rape, incest or fetal abnormality. Gordy said his support of elected school boards also was important.

Benson, a business manager for a Washington newsletter who defeated Democrat Fred J. Ricci, said he is happy to face Gordy instead of Rust in the general election in the 37th District, which includes Fairfax City and neighborhoods to the north of it. "It's going to be a lot easier," said Benson, who like Gordy is making his first try for elected office. "Voters here are fairly rational and middle of the road. Someone who represents the extremes of the New Right can't win in a general election."

"I don't know the definition of 'New Right,' " responded Gordy, who taught in Loudoun County public school after leaving the Army. "I consider myself as being a mainstream Republican."

Several Fairfax politicians said they believed Rust lost because his was the only district with both Democratic and Republican primaries. Virginians do not register by party and so Democrats, who may have supported moderate Republicans in other districts, did not participate in the Rust-Gordy race.

Dillard, a public school administrator, is so popular with Democrats and the groups that normally support them that the party was unable to field a candidate to run against him in the Burke area district. Dillard's nomination yesterday therefore was tantamount to election.

Harris and Thoburn, who had faced each other in four previous primaries, attacked each other in a new district that includes Fairfax Station, Centreville, Clifton and two precincts in western Prince William County. Thoburn said Harris had accomplished little in his nine years in the House, while Harris labeled Thoburn an "extremist" who could not work effectively in Richmond.

Harris, an executive for Rockwell International, will face Prince William Democrat Claude J. (Brad) Bradshaw in the fall.

Squyres, a real estate broker identified with feminist issues, easily defeated land developer Wayne M. Lynch in a district west of Falls Church for the right to challenge first-term Republican Del. Gwendalyn Cody.

McQuigg, a consultant who lives in Lake Ridge, and Young, a computer analyst in Dale City, squared off for the right to challenge Democratic Del. David G. Brickley in Prince William County's 51st District.