There is evidence a high-ranking public servant from Western Australia’s Department of Communities stole up to $25 million of taxpayer money, or 10 times more than he is currently charged with, a court has heard.

Assistant director-general of corporate operations Paul Whyte, 56, and his close associate, 43-year-old Jacob Anthonisz, are accused of raising false invoices for more than $2.5 million in payments to two shelf companies.

Both faced Perth Magistrates Court on Friday, where police prosecutors opposed bail, saying the investigation was ongoing and there was evidence the total theft was $20 million to $25 million, dating back to 2008.

They said the pair had a longstanding friendship and spent the money on buying racehorses, paying a horse stud in New Zealand, and personal expenses and bills.

The court heard the invoices, averaging one a month, were just below the $50,000 threshold over which Whyte would need further departmental authorisation to have them paid.

He had stewardship of standards, governance, integrity and corporate assurances, and sole oversight of the cost centre.

Whyte, a father of three, has been suspended from work.

Anthonisz’s lawyer argued her client wasn’t the principal offender, noting he was the holder of the company bank accounts and the authorised signatory, but the magistrate did not accept he appeared to play a lesser role.

“It takes two to tango and he’s equal as far as I’m concerned,” she said.

Prosecutors argued both were a flight risk, saying some of the money had gone offshore.

But both were granted bail, with Whyte ordered to pay a $500,000 personal undertaking and a $500,000 surety, while Anthonisz must pay a $75,000 personal undertaking plus a $100,000 surety.

The magistrate accepted Anthonisz, a father of five, had few assets, rented his house and was the sole carer for his unwell wife while working full-time as a physiotherapist.

Whyte, on the other hand, has two properties in affluent Mosman Park, which have been frozen while the investigation continues.

The case returns to court on December 13.