Senator Michaelia Cash's then-chief of staff was the source of leaks, alerting media to pending federal police raids on the Australian Workers' Union in 2017.
Senator Michaelia Cash's chief of staff Ben Davies was the source of a controversial leak to media about imminent police raids at Australian Workers' Union offices.
David de Garis, a former media adviser to the Senator who admitted passing on leaked details to journalists, was ordered to name his source by Federal Court Justice Mordecai Bromberg on Tuesday.
The union is talking legal action against the Registered Organisations Commission, arguing the federal police raids on the union's Melbourne and Sydney headquarters in October 2017 as part of a commission investigation were politically motivated and therefore unlawful.
The AWU believes it was instigated by Senator Cash in a bid to hurt the union and Opposition Leader Bill Shorten.
Justice Bromberg said while Mr de Garis had "respectfully declined" to name his source on grounds it could incriminate him, it was in the interest of justice that the identity be revealed.
Provided with a court guarantee that his answer would not incriminate himself, Mr de Garis named Mr Davies under questioning by AWU legal counsel Herman Borenstein QC.
"He said around 4pm there would be the execution of raids," Mr de Garis said.
The conversation lasted only a few minutes and happened in Mr Davies' office on the day of the raids, he said.
A short time later he contacted several media outlets with the intention of arranging coverage of the raids.
He admitted he didn't understand the consequences of his actions at the time, but had wanted to get media coverage of the raids as the investigation was one of the first by the commission.
Mr de Garis earlier said the investigation was significant to Senator Cash for that reason.
Mr Davies is no longer Senator Cash's chief of staff.
The trial continues.