A man who has shown no remorse for pulling a loaded shotgun on two West Australian police officers, discharging it close to the head of one of them, has been jailed for at least seven years.

Russell Graham Penny protested to the judge he was being "railroaded" during sentencing.

He had been stopped by police on a remote Wheatbelt road for a broken tail light in November 2013 when he pulled a modified shotgun on Sergeant Michael Richard Williams.

The Supreme Court heard on Wednesday that Sgt Williams tried to wrestle the gun from Penny, then aged 45, but both men fell to the ground.

During the violent struggle the gun was pointed at the officer's face several times before it discharged just five centimetres from his head, causing short-term deafness in the officer's ear.

The gun was also pointed at Constable Emma Needs's cheekbone as she went to help her partner, who is also her fiance, but it didn't go off.

The court heard Penny's gun could have discharged by accident with the safety on because it was faulty.

Const Needs then fired her pistol at Penny's stomach, making him scream out in pain and dropping the weapon.

Justice Robert Mitchell said the officers' actions on the night were exemplary and crucial in avoiding a fatal outcome.

But Penny, a convicted murderer and rapist, showed no remorse for putting the pair's lives in serious danger and his case was almost bereft of mitigating factors, the judge said.

The sentencing had to be adjourned briefly because Penny refused to listen to what happened.

"I'm getting railroaded here," Penny said.

He was sentenced to nine years behind bars and must serve a minimum of seven years, with Justice Mitchell saying he granted parole eligibility by the "barest of margins".

Outside court, WA Police Union president George Tilbury said he was very disappointed by the sentence and urged prosecutors to appeal.

"This has taken a significant toll on these two officers and their families," Mr Tilbury said.

"They're glad it's over but that's an experience no police officer ever wants to go through."