Ontario's top court has ruled doctors must get approval from a provincial medical board when their decision to withdraw life-support treatment goes against the wishes of a patient's family.

The decision means physicians cannot decide on their own to disconnect the breathing machine they say keeps Hassan Rasouli alive in a vegetative state at Toronto's Sunnybrook Hospital.

Rasouli's doctors had sought to stop his treatment, a move opposed by his wife and substitute decision maker Parichehr Salasel.

The Ontario Court of Appeal agreed with Salasel, upholding a lower court ruling that Rasouli's physicians need the approval of Ontario's Consent and Capacity Board before they can take the patient off a ventilator.

But the appeal court was careful to say its decision only applies in cases where there is a risk of immediate death.

That means doctors will not need capacity board approval to discontinue treatment they deem ineffective in situations that are not life-threatening.

Rasouli's daughter Mojgan said she's happy about the court's decision.

"This decision means human life is important," she said. "He's alive. He wants to be alive. He needs time."

With files from CBC News