The student Mayur Gupta, who belongs to Agra, was granted bail Tuesday.
Mayur, a third year MBBS student at the state government-run Medical College and hospital, was caught Saturday, after his failed attempt to rob a nationalised bank in Bambolim, on the outskirts of the capital.
In his statement to the trial court here, Mayur has said he was "forced to resort" to rob a bank to fund a book he was going to publish.
He, however, gave no clear details about the book he was aiming to send to the publishers.
Wearing a helmet, the audacious Gupta had tried to rob a woman at knife point. But when her colleagues attacked him, he fled.
Curiously, Gupta visited the crime scene again in a couple of hours when the police were conducting a crime report wearing different set of clothes and slippers instead of shoes.
But alert staffers of the bank recognised him and asked the police to nab him.