A 17-year-old — presumed dead by his parents and relatives — miraculously woke up on the way to his own funeral in an Indian village, according to a report.

Kumar Marewad was bitten by a stray dog one month ago and after he came down with a high fever last week, he was rushed to a hospital in Dharwab, Karnataka, India, the Times of India reported.

Kumar’s condition worsened, with an infection from the dog bite spreading throughout his body, and he was put on a ventilator.

Doctors told his family that if he was taken off life support, he wouldn’t survive.

The teen’s family made the decision to bring him home and once they presumed him dead, they quickly made arrangements for his funeral.

“We had decided to take Kumar home after doctors told us his chances of survival were bleak once taken off the ventilator,” Kumar’s brother-in-law Sharanappa Naikar told the news outlet.

On the way to his funeral in Dharwad’s Managundi village — about a mile from where the ceremony was to take place — Kumar suddenly came back to life, opening his eyes, wiggling his hands and legs, and breathing fast, according to the Times of India.

He was quickly rushed to a nearby hospital and put back on a ventilator.

“We suspect he suffers from meningoencephalitis, an infection caused due to dog bite,” said his doctor, Mahesh Neelakhantannavar.

Kumar’s parents told the news outlet they “need support for his treatment.”