How Schapelle Corby narrowly escaped a death by firing squad.

Convicted drug smuggler Schapelle Corby, due to return to Australia in the coming days, was only spared the death penalty due to her young age, according to a News Corp report.

The report, carried across several Australian mastheads on Friday, says the prosecutor, Ida Bagus Wiswantan, gave Corby a second chance despite her refusal to admit she was guilty.

“I felt that Corby can still rehabilitate herself so the death sentence is not the punishment. If she got the death sentence she cannot rehabilitate. But I felt that Corby has the chance to fix herself,” Wiswantan said.

“For sure it (the death penalty) was discussed.”

The 39-year-old Corby is expected to be deported from Bali on Saturday. She was released from prison in 2014 but was unable to leave Indonesia until this month according to parole conditions.