A lawyer for the federal government, denied an opportunity to take the Virginia bar exam because she lives with a man out of wedlock, has asked the Virginia Supreme Court to overturn a state judge's ruling that she is "morally unfit" for the bar.

Bonnie Cord, 33, has petitioned the court for a writ of mandamus compelling Warren County Circuit Judge Duncan C. Gibb to permit her to take the exam and thus qualify to practice law in Virginia.

Gibb denied Cord's application for certification to take the exam on March 17, holding that her living arrangement would "lower the public's opinion of the bar as a whole."

But Cord, an attorney with the Federal Energy Regulatory Administration in Washington, is fighting the judge's opinion and, and in the process, has taken on the state attorney general's office. "This is the first time, I guess, I have ever taken a stand on anything, and it's really not much of a stand," she said yesterday. "I just want to take the bar [exam]."

Cord holds a bachelor's degree in physics from Sweet Briar College and graduated from Georgetown University Law School in 1975. She also has taken graduate courses in physics from the University of Cincinnati.

She was admitted to law practice in the District of Columbia in 1975 and filed application with the Virginia Board of Bar Examiners last winter after moving to Linden, Va., in the Blue Ridge foothills near Front Royal.

Her petition to the Virginia court states that she lives with a man to whom she is not married, but says she expects to marry him and in the meantime is proceeding in "a highly moral way" to discover if such a "lifetime relationship" would be wise.

"Gibb's "archaic, arbitrary and capricious" action, she contends, amounts to an effort by the state to pressure her into "committing myself to marriage or dissolving a relationship in order that I may practice my profession and earn my living in the state in which I live."

Assistant Attorney Gen. John Hardin Young, in an answering brief, said Cord had "no right to a certificate of good moral character" necessary to qualify for the exam. In fact, he said, she is violating Virginia laws against both "fornication" and "lewd and lascivious cohabitation."

The fact that she has not been prosecuted, Young argued, does not mean she is not breaking the law.

Reached yesterday after her court petition became public record. Cord was reluctant to talk about her case which she said she "always thought should be kept private, even from the state of Virginia."

She said she discussed her suit with "a few superiors" at the energy agency because "I thought they ought to know," but otherwise has kept the case to herself. "But when I was turned down I knew I couldn't just leave it there. I had to follow my legal avenues."

She said she had never heard of anyone short of a convicted felon being denied a chance to take the bar for moral reasons.

A Virginia attorney said background checks for prospective lawyers are not always common. When an applicant for the bar exam comes directly from law school in the state, the attorney said, the law school dean customarily certifies to the applicant's moral character.

When someone has recently moved to the state, however, or is some years out of law school, the local judge usually appoints three persons to investigate the applicant's character.

Gibb did so and they recommended by a vote of 2 to 1 Nov. 3. that Cord be permitted to take the exam. Their report noted, however, that she had bought a home near Linden with a man who was not her husband.

Gibb held a private hearing on the matter Jan. 19, then wrote the state bar that he would deny her application and, on March 17, signed an order doing so.

Sexual misconduct is not a ground for disbarment of lawyers practicing in the state, Cord's petition says.

Under Virginia law, both fornication and cohabitation are misdemeanors, the first punishable by a fine of $20 to $100 and the second punishable by a $50 to $500 fine and six to 12 months in prison. They are part of a rarely-enforced section on sexual offenses.