Australia's leading Sunni Muslim organisation has agreed to pay A$22m (£13m, $17m) to an Islamic school it founded after being accused of "unconscionable conduct".

Sydney's Malek Fahd Islamic School is suing the Australian Federation of Islamic Councils (AFIC) over allegations it used the educational institution as a cash cow. The school alleges that AFIC – which is reported to sit on assets of A$65m – treated it as a "servant".

Malek Fahd, which caters for almost 2,500 pupils, was set up by AFIC with a multi million dollar gift from King Fahd of Saudi Arabia in October 1989.

The school is now suing AFIC for A$45m in damages after relations between the organisations soured over decades, with the complainant alleging that AFIC "seized control" of its governance in the 1990s.

The Sunni umbrella organisation then siphoned funds away from the school by charging rents at more than double the market rate and through spurious management and construction fees, NSW Supreme Court heard.

"Clearly, in so doing, AFIC preferred its interests to the interests of Malek Fahd, which it regarded and treated as its subsidiary and property," Barrister Kelly Rees said.

"AFIC exercised complete control [over the school] through the appointment of the entire board. A bigger breach of fiduciary obligation is hard to conceive," she added, as reported by the Sydney Morning Herald.

AFIC has agreed to almost half of the damages through a direct payment (A$10m) and through transferring a property (A$12m) but made no admissions of wrongdoing. The suit is ongoing.

Malek Fahd school
Malek Fahd school has split from the Australian Federation of Islamic Councils Google maps

The Australian government were so concerned about financial improprieties at Malek Fahd that it withdrew A$19m of public funding in 2016.

In a report seen by The Guardian, The Department for Education identified AFIC figures within the school's management who were being paid large sums of money for services it was hard to identify.

The school – which severed ties with AFIC in the aftermath and now has new management – is seeking recompense for that funding in a separate case.

Any Malek Fahd board members who dared to raise objections to AFIC's influence on the school were promptly sacked and accused of being disloyal, Rees said.

AFIC is disputed Malek Fahd's claims on several counts. The hearing continues.