The last time Virginia voters saw the name of Guy O. Farley Jr. on a ballot, the Northern Virginia trial lawyer was a Democrat running for attorney general -- a state delegate who had a reputation among his legislative colleagues as a Byrd organization man and something of a playboy.

Twelve years later, Farley, 48, has returned to the forefront of state politics as a strong contender for lieutenant governor -- only this time on the ballot of the Republican Party and in the role of a born-again Christian and ally of Ronald Reagan, whose name graces his two-page campaign brochure in 16 places.

"It's the most remarkable thing you ever saw," says one senior Republican legislator. "He came from nowhere and got himself elected to the Republican National Convention last summer, and now he's trying for lieutenant governor. He's got the whole damn crowd [of Republican regulars] scared to death."

Farley's political odyssey has as much to say about changes in Virginia's political hierarchy over the last decade as it says about Farley himself. Where once the state's power structure revolved around Democratic Sen. Harry F. Byrd, Reagan's Republicans and the fundamentalist forces of television preacher Jerry Falwell have made strong inroads -- a coincidence that leads Farley's opponents to write off his political and religious conversions as motivated by self-interest.

"What do you call those people who study lizards?" remarked one Democratic legislator who knew Farley when he and another prosperous Fairfax lawyer were known as the legislature's "Gold Dust Twins." "You don't need to be a professional to know a chameleon when you see one."

At present, Farley is running fairly even with State Sens. Herbert Bateman of Newport News and Nathan Miller of Harrisonburg in balloting at local GOP nomination meetings that will lead to the party's nominating convention June 5-6 at Virginia Beach. That's precisely how Farley's political theorists say he should be running at this stage of the race, because his strongest areas have yet to be heard from.

Farley's early successes have not pleased many of the state's so-called "Main Street Republicans," who fear that Farley's ties to the Moral Majority could scare some voters away from GOP gubernatorial candidate J. Marshall Coleman in a potentially close race against Democratic Lt. Gov. Charles S. Robb. "It's going to be close, and if we put anybody in the second spot whose weakness could be exploited it would really be damaging," said Fairfax Supervisor Marie B. Travesky.

Instead, many of the party's most influential members are throwing their support and their money behind the 52-year-old Bateman. Republican Gov. John N. Dalton has yet to announce his position publicly, but is said to be backing Bateman and is believed to be the one who persuaded Bateman to jump into the race.

Miller, a boyish 37-year-old lawyer, is holding his own in balloting at the initial mass meetings, but is believed to be at a disadvantage because he has little name recognition in many areas of the state, and is somewhat lackluster speaker.

For his part, Farley is emphasizing such perennial conservative issues as law enforcement, balanced budgeting, opposition to the Equal Rights Ammendment and abortion, while backing away from discussions of his religious beliefs. "My faith is a personal decision," he says. "I don't want anybody to vote for or against me on that basis. Does that make sense?"

But a look at The Conservative Virginian, a 1,000-circulation magazine Farley started publishing about a year ago, shows that religion and politics are never very far apart in his mind. In the magazine's charter issue, Farley outlined some of his goals for the magazine in a column topped by his picture.

Among them were: "Presenting the message of Jesus Christ," and "applying Biblical principles to politics and government by presenting the Biblical perspective on issues." Elsewhere in the magazine appeared a photograph of Farley with Falwell and Dalton. Other articles have explored the biblical justification for capital punishment and warned of homosexual activity at the University of Virginia.

Some Republican regulars fear that these quasi-religious appeals, coupled with what they concede is a strong Farley organization, could give the candidate a solid advantage in the local nominating meetings by allowing him to pack the sessions with people who have loyalty to the Republican party. In the past few weeks, Farley has sen letters to more than 100 clergymen asking for their support as a "strong family spokesman," and has signed up many members of his own church congregation as Farley delegates.

Other Republicans are less than pleased at the relative ease with which Farley and Bateman, both former Democrats, propelled themselves to top spots on the party's nominating ballot. "There are so many good, deserving, hard-working Republicans around that could do a good job for us," says State Del. Clinton B. Miller, a Shenandoah Republican who is backing Nathan Miller (no relation). "We don't need to be looking for people who in the past year or year and a half have become Republicans."

Many who watch politics in Warrenton, the quiet Fauquier County town from which Farley commutes to his Fairfax law office, say the Republican candidate is almost an enigma there. After a six-year stint in the Virginia House of Delegates as a conservative Democrat representing Fairfax County, Falls Church and Alexandria, Farley lost a bid for the Democratic attorney general nomination to Andrew P. Miller in 1969 and effectively dropped from the state's political scene for more than 10 years.

"We went back to our clip files not long ago and we had nothing on him -- not one thing," says David Lyne, who until recently worked as the managing editor of The Fauquier Democrat, Farley's hometown newspaper. "He just suddenly popped into the limelight at the Republican convention last year. It certainly caught me off guard."

Farley says he spent the last 10 years practicing law in Fairfax and helping local Republicans with their campaigns. More recently, he has served as chairman of the county's Republican committee. "I've never thought that when you change parties you start at the top," he says. "I believe in working your way up."

According to Reagan supporters, Farley's performance at the Republican National Convention in Detroit last summer was the single most important factor in cementing his ties with the president. As one of two Virginia representatives to the platform committee, Farley led the fight to dump the party's 40-year stand in support of the ERA and pass a platform plank supporting a constitutional amendment to ban abortion.

Many former Reagan organizers have now joined Farley's forces, and they aren't shy about saying that they believe one of his campaign strengths is his strong tie to religious fundamentalists. "Guy is a Christian, and the fact that he is unabashedly so, and that we as conservatives have a lot of common grounds with Christian groups, makes him the natural favorite of those groups," says political organizer John Alderson, who formerly served as Reagan's state coordinator and is now chairman of Farley's campaign.

it was during his years as a Democratic legislator, where he and former State Sen. Robert C. Fitzgerald were known as the "Gold Dust Twins," that Farley picked up his reputation as a ladies' man. "I guess you could say we were younger and wild and wooly," says Don Uffinger, a Fiarfax private investigator who has known Farley for 25 years. "He and I used to spend a lot of time at the race tracks and ran around with a lot of women -- but we've changed."

After Farley lost his race for attorney general in 1969, his wife of 16 years filed for divorce on grounds of infidelity and he countersued, claiming among other things that she had repeatedly tried to kill him with a knife. A Fairfax judge granted Janet H. Farley the divorce on grounds of desertion, and gave Farley custody of the couple's three children.

A month later he married the former Leslie Prather of Richmond, a schoolteacher he had met during the attorney general campaign. "There's no question that when I was in Richmond in the legislature I did go to a lot of parties and go the races and had racehorses," says Farley, who is now pushing for "preservation of family rights" in his campaign. "But that's a thing of the past and I think my own private life is my own business."

Friends of Farley say it was the pain of the divorce, along with problems with a son and son-in-law who have recently pleaded guility to criminal charges of drug possission and theft respectively, that led to Farley's conversion to fundamentalism a few years ago. As a result, they say, he's sold the racehorses that used to be his pride and joy, and given up all alcohol except an occasional glass of wine with dinner. "We think he's a real man of God," says Linda Weelsford, whose husband is the minister in Farley's church.