The Construction, Forestry, Mining and Energy Union (CFMEU) must pay around $9 million in damages and legal costs to Boral after the union's boycott of the construction company was ruled illegal.

The Victorian Supreme Court has ordered the CFMEU to pay $4 million in damages, Boral said, as well as legal costs for the proceedings estimated at close to $5 million.

The CFMEU is banned from forcing workers not to use Boral products at any Victorian worksite, and from interfering Boral’s supply of goods and services, for the next three years.

The legal action follows an industrial dispute which allegedly saw the CFMEU Victoria branch try to block the use of Boral products due to the union’s industrial dispute with builder Grocon.

Boral is Grocon's concrete supplier.

Mike Kane, CEO and Managing Director of Boral, said it was a “ground-breaking” legal outcome.

“This agreement is a huge step in the multi-year effort to re-establish the rule of law on Melbourne construction sites,” Kane said in a statement.

“We will now be protected against illegal interference in serving our customers.

“We have fought long and hard to get to the point where we can start to reclaim our position in the Melbourne CBD and we look forward to working with those customers that have felt unable to do so because of the ban.”

A CFMEU spokesperson described the court order as “a humiliation” for Mr Kane.

“Boral has claimed losses of over $23 million dollars, yet the matter has been settled for $4 million,” the CFMEU said in a statement.

“Mr Kane's ideological campaign against the union has been damaging Boral's reputation for that entire time.

“Shareholders will be breathing a sigh of relief now Mr Kane will be able to spend more time focusing on the financial future of Boral rather than waging ideological wars against the union movement.”

The union says it hopes the “end of these court proceedings will allow Boral to focus on safety rather than politically motivated litigation”.

But Boral says that because of the agreement, the CFMEU will be required to pay “$50,000 to $200,000 per occurrence” of any similar action in the future.

“These amounts will double where there are three or more breaches in any 12 month period,” Boral said.

“For example, in a year where there were four breaches at the maximum amount, the total amount payable by the union in that year would be $1.6 million.”

Reports say the finding in the Victorian court will have no bearing on other legal action relating to the dispute.

In the Federal Court, the Australian Competition and Consumer Commission (ACCC) has a case in which it alleges that the union's boycott of Boral is prohibited under the Competition and Consumer Act.

The ACCC says the CFMEU breached the act by involving third and fourth parties in the Grocon industrial dispute.

The regulator is seeking financial penalties, declarations and injunctions against the CFMEU’s Victorian branch secretary John Setka and assistant secretary Shaun Reardon in particular.

The ruling will also have no impact on investigations into the union as part of the Royal Commission in Trade Union Governance and Corruption.