A man accused of setting fire to a historic Yass pub has been released from custody, with a magistrate calling the alleged act "bizarre behaviour".
The alleged arsonist will return to the community but has been banned from being within 50km of the NSW town where he is said to have started the destructive blaze.
Shyhiem Whilliams, 21, faced the Queanbeyan Local Court on Friday for a bail review, charged with damaging property by fire or explosive to a value of more than $15,000.
The Carlingford man is accused of starting the fire which burnt the Commercial Hotel in Yass about 2am on Monday.
Magistrate Roger Clisdell said the alleged offender was at "enormous risk" of self-harm in custody.
"I'm reasonably confident that if I remand him in custody, I might be giving him a death sentence at this stage, given his mental health issues," Mr Clisdell said on Friday.
Despite police prosecutor Jason Burt opposing on the basis of the man endangering the community and an alleged likelihood of him offending, Mr Clisdell granted Whilliams bail.
The magistrate said he was a "little concerned" that the man had been "a long way from where he was meant to be" when allegedly committing the offence.
Mr Clisdell also said the alleged act could be interpreted to resemble a firefighter starting a blaze in order to then report it.
The fire was said to have caused an estimated $1 million in damage to the hotel.
Goulburn Local Court magistrate Geraldine Beattie ordered the alleged offender's mental health be assessed on Tuesday, at his solicitor's request.
Whilliams was assessed as suitable for release into police custody by Goulburn's Chisholm Ross Centre.
However, Mr Clisdell described the man on Friday as being "severely unwell".
Whilliams was previously denied bail in Goulburn Local Court on Thursday, when the court heard the man had been on bail at the time of the alleged incident.
Police prosecutor Sergeant Nick O'Flynn also told that court Whilliams had "hung around" to film himself after the fire and take photos of the blaze.
It took more than 40 firefighters from NSW and the ACT over six hours to extinguish the fire that engulfed the derelict hotel, which has been closed to customers for 18 years.
There were reportedly plans to redevelop the historic hotel, which has now suffered extensive damages, as a "family-friendly pub".
The fire did not spread to neighbouring shops thanks to the efforts of firefighters.
Whilliams' only words to the court on Friday were "thank you", upon being told of his immediate release.
His bail conditions include residing in a home residence which he can only leave in the presence of certain family members.
As well as the condition to stay away from Yass, he must abide by a curfew, report to police every day, not drink alcohol or take drugs, and contact and get treatment from a mental health outreach service.
The man is set to face court in Goulburn again on June 21.