Two Perth men have been sentenced to life in jail with a 21-year minimum for the fatal bashing of a gay man in a public toilet at a Perth reserve.

Mark Taylor and Daniel Wade Jones were found guilty of murdering 48-year-old Warren Batchelor at the Middle Swan Reserve in November 2013.

The Supreme Court was told Jones and Taylor, who was with his four children, were camping in the reserve and were angry it was used by gay men for sexual encounters.

Mr Batchelor had been having a sexual encounter with another man in a disabled toilet when Jones and Taylor burst in and bashed him.

Taylor threatened the two men with a knife and punched and kicked Mr Batchelor while Jones beat him with a pole.

The other man managed to escape.

Mr Batchelor died in hospital two days later.

Bashing motivated by prejudice and hostility: judge

Prosecutors had alleged the bashing was a vigilante attack to rid the area of gay men, but Supreme Court Justice Lindy Jenkins said she would not go so far as to say the men were vigilantes.

"I don't accept that, but nevertheless I have no doubt you wanted that behaviour to stop ... and warn others away from the reserve," she said.

"You were motivated by prejudice and hostility."

Justice Jenkins said Mr Batchelor had done nothing to provoke Taylor and Jones who attacked an "unarmed and unsuspecting man".

She said while Taylor may have had concerns about his children being exposed to sexual activity and other antisocial behaviour, his actions went "far beyond what might have been expected by a father".

Justice Jenkins said the men should have reported what was going on to police or the local authorities, or asked those engaging in the activity to stop.

"Sexual conduct in a public place is not provocation for an assault of any kind," she said.

She also said the men showed no regard for whether Mr Batchelor lived or died and made no attempt to get him medical help.

Both men denied fatally injuring Mr Batchelor but a Supreme Court jury found them guilty.

With time already served the men will first be eligible for release in 2034.

After the sentence Mr Batchelor's family issued a brief statement.

"Knowing our beloved Warren, he would have forgiven them already," it said.

"While we pray for them to be rehabilitated, and if ever returned to the community as better persons, we remain broken for the rest of our lives.

"Our thanks again goes out to everybody."