A Geraldton doctor who bludgeoned her sleeping husband to death with a mallet after years of abuse has been sentenced to four years' jail for his manslaughter.

Chamari Liyanage, 36, killed Dinendra Athukorala at their home in June, 2014 and was acquitted of the more serious charge of murder.

Key points: Doctor acquitted of murder, guilty of manslaughter

Doctor acquitted of murder, guilty of manslaughter Sentenced to four years' jail

Sentenced to four years' jail Chamari Liyanage bludgeoned husband with a mallet

Chamari Liyanage bludgeoned husband with a mallet Jury heard evidence of years of domestic violence

A Supreme Court jury deliberated for almost seven hours before reaching its verdict, after hearing three weeks of evidence in Geraldton.

With time already served, Liyanage will be eligible for parole in July.

During the trial the court heard about a five-year marriage defined by the "worst kind" of escalating sexual, physical and emotional abuse.

Liyanage testified she had tried to leave her husband six times, but was trapped in a cycle of abuse with someone who was "a monster".

Dr Athukorala's body was found on June 24, 2014, after a triple-0 call made by Liyanage at 6.30am.

Police officers arrived to see her huddled by the couch in a distressed state.

When they walked into the main bedroom they found her husband lying on the bed surrounded by blood and with a pillow over his face.

A 1.79 kilogram mallet was lying next to his head.

Liyanage had no obvious injuries that pointed to signs of a struggle.

She maintained she remembered nothing in the five-hour period after going to sleep the previous night and waking up the next morning.

'State of automatism'

Two forensic psychiatrists called by the defence told the court that after some sort of psychological trauma or extended period of abuse, a person can "flip over" into a state of automatism, in which their mind acts independently of their body.

The state is likened to that of sleepwalking where a person can perform complex tasks but not remember doing them.

The years of abuse that may have led to Liyanage experiencing automatism were hidden to anyone who knew the couple.

A long list of friends and colleagues testified that to all outward appearances they seemed happy and in love.

Chamari Liyanage used a mallet to kill her husband Dinendra Athukorala. ( Supplied: Supreme Court )

But Liyanage revealed it was an act to prevent her husband spiralling into abusive rages behind closed doors.

During her two-and-a-half day police interview, Liyanage pointed officers to a metal chair that had become unstable from being used to beat her, a wooden rolling pin that had left bruises on her inner thighs, and marks on the wall where dinner plates had been thrown at her.

Liyanage said her husband was never satisfied with her and pushed her into having affairs with other people, while he spent much of his time seducing young women, mostly teenagers.

He would leave her number on pornography websites, keep her up at night to perform sexual acts to be streamed online to strangers, and force her to watch child pornography while they had sex.

The court heard Dr Athukorala kept 13 terabytes of encrypted child exploitation and bestiality images on his three laptops and a number of hard drives.

In the months leading up to his death, Liyanage said her husband's behaviour escalated and she was in a constant state of panic and anxiety.

She tried to kill herself a number of times.

Her psychiatrist told the court she felt freer and more at peace while in prison than she had in a number of years.

'Excessive response': judge

In sentencing, Justice Stephen Hall said it was likely Liyanage knew what she was doing.

"It must have been multiple blows to the temple area, as you are a doctor would have known is a vulnerable area of anatomy," he said.

"I accept that you experienced amnesia ... but amnesia described as post traumatic amnesia.

"I accept that at the time you did this you were acting in defence of another," he said.

"But it was excessive and disproportionate to that threat.

"Apart from this offence you have been it would seem of exemplary character," he said.

"You are not a person at risk of reoffending.

"Dinendra Athukorala was a manipulative and merciless offender.

"However, [his death] was not justified, you went too far," he said.

"Human life is sacred, that cannot be taken even in the most apparently deserving of circumstances."

Following the verdict defence lawyer George Guidice called for the law to be reformed in relation to women in domestic violence situations.

"There are good reasons that women do not leave abusive relationships," he said.

"The prosecution says she could have simply walked out the door.

"But of course it's not as simple as that and this is the situation women find themselves in."