A Fairfax County judge sentenced a 22-year-old Northern Virginia man to two years in prison yesterday for the attempted rape of his estranged wife and scolded the husband for having "an outmoded notion of what he may or may not do with his wife."

The case, which the husband said will be appealed to the Virginia Supreme Court, is believed to be the first conviction of a husband under the state's rape laws for an offense against his spouse.

Circuit Court Judge Richard J. Jamborsky imposed the full sentence recommended by the jury that convicted the carpenter's assistant Dec. 23 of attempting to rape his wife. The judge said, however, that he believed the man was guilty of the more serious offense of rape, which carries a penalty of five years to life in prison.

The man received the minimum prison sentence for attempted rape, which carries a penalty of two to 10 years. Under the sentence Jamborsky imposed yesterday, the husband could be eligible for parole in less than five months, court officials said.

Court testimony revealed the man scaled six floors of balconies of an Annandale apartment building "like Spiderman" to enter an apartment his estranged 20-year-old wife was visiting.

The wife testified her husband was enraged and accused her of having an affair with the man who lived there. The husband dragged her into a bedroom and raped her while friends pounded on a locked door outside, she said.

The husband argued that his wife had willingly engaged in foreplay and began screaming "rape" only after they began arguing.

"I believe the jury . . . concluded the rape was unsuccessful because he [the defendant] did not ejaculate," Jamborsky said.

The judge delayed imposition of the sentence pending the husband's appeal and allowed him to be released on $500 bond.

Defense attorneys argued yesterday the husband should be given a suspended sentence because "he is not a vicious attacker."

"I am astounded that counsel would say it's not a vicious rape," shot back assistant commonwealth's attorney Thomas Gallahue. "There can be no such thing as a rape that is not vicious."

The couple had been separated 11 months at the time of the offense last October, a fact that Jamborsky ruled early in the trial was crucial to the case.

The wife did not attend the sentencing hearing.