Abdula Ganiji, 58, sparked a dramatic two-hour stand-off with riot police last December after parking outside state parliament with two fuel containers in his car.

Ganiji then allegedly called Triple 0 and said ‘‘there’s a bomb in the car and I’m going to blow this house’’.

The siege put the government building into lockdown, with NSW Premier Barry O’Farrell holed up inside.In granting Ganiji bail in the Supreme Court on Wednesday, Justice Peter Hidden said that psychological assessments revealed the former cabbie was unlikely to harm others.

The court was told Ganiji had become obsessed with the injustice of losing his job as a taxi driver in Wollongong in 1999.

He has since written repeatedly to state MPs and had held a hunger strike outside parliament for eight days in 2012.

Quoting a psychiatrist’s report, Justice Hidden said Ganiji had ‘‘strong thoughts of dying of a hunger strike or dying of burning himself in front of Parliament House’’.

He noted that Ganiji’s psychiatrist of more than 10 years believed the former taxi driver had a strong moral code and was ‘‘unlikely to ever be able to harm anyone’’.

Appearing on video link from Bathurst Prison, Ganiji remained expressionless throughout proceedings.

He has been charged with offences including threatening sabotage, possessing an explosive device to damage property, and threatening to destroy or damage property.

Ganiji has been placed under strict bail conditions, including not going to Sydney’s CBD without adult accompaniment.

He is also not able to approach any member of parliament but he is still allowed to write to them.