STOCKHOLM (AFP) - A Swede who had sex with a woman while he was asleep was acquitted of rape because he suffers from "sexsomnia", according to a court ruling AFP obtained Thursday.

The 26-year-old man did not have "the intention" to have sex, the Sundsvall appeal court in northern Sweden said, as it overruled the previous two-year-prison sentence.

The argument that the defendant "was in a state of sleepiness, unconscious of what was happening, does not seem absurd", the court said in its judgement, issued on Sept 8.

The decision was mainly motivated by the intervention of a doctor specialising in sleep disorders who said that the defendant could suffer from sexsomnia, a state in which a person can have sex asleep.

The theory was confirmed by the man's previous partner.

According to psychiatrists specialising in sexsomnia, a condition that has not been widely researched yet, it is a sleeping disorder close to sleepwalking which includes sexual behaviour.

Those affected by sexsomnia are completely unaware of their acts, specialists say.

However, the affliction is very controversial among physicians and lawyers.