Updated

A court has granted bail to Bollywood superstar Salman Khan, who spent the past two days in prison after he was convicted of poaching rare deer in a wildlife preserve two decades ago.

Judge Ravindra Kumar Joshi on Saturday ordered Khan to sign a surety bond of 50,000 rupees ($770) before he could be set free in Jodhpur, a town in western India.

Khan's overjoyed fans danced outside the courtroom.

His attorney Mahesh Bora challenged the trial court order sentencing Khan to five years in prison.

Khan is likely to be released from jail later Saturday.

The actor says he did not shoot the two blackbuck deer in 1998. He was acquitted in two related cases.

The 52-year-old Khan has starred in more than 90 Hindi-language films.