A city bus driver was critically injured trying to stop his runaway bus from crashing in Queens.

The Transport Workers Union says Kalib Olivier parked his bus near the All Faiths Cemetary on Metropolitan Avenue in Ridgewood at about 1:30 a.m. Tuesday.

MTA sources say he failed to secure the vehicle, which began to roll backwards towards the cemetery.

The union says Olivier tried to slow the bus down by pushing it and got pinned against a pole in the process.

They say another driver then secured the vehicle and called for help.

Olivier was rushed to Elmhurst Hospital, where he is undergoing surgery.

No passengers were on the bus at the time.