At death’s door

To be near death.

The young woman was at death’s door after the accident.