Ryerson University has been ordered by an Ontario judge to transfer millions of dollars it has been withholding from the school's student union.

Justice Markus Koehnen says in a decision released Monday that if he did not grant an injunction requested by the student union, it would be forced to shut down.

The justice says while on balance not granting the injunction would have relatively little impact on the university, it would have a serious impact on services provided by the student union.

The court battle came after Ryerson's student newspaper reported last January that student union credit card statements apparently showed expenditures of more than $250,000 over eight months.

The Canadian Press has not seen the credit card statements and the union's financial controller declined to comment on the matter at the time of the allegations.

The school subsequently told the student union it would withhold the fees it collects from students for the union until a forensic audit was conducted and the results shared with the university, and a new operating agreement was negotiated.