The man accused of descending on Capitec's administrative offices in Bellville, Cape Town this week, gun in hand, stumbled into the dock in the Bellville Regional Court on Friday.
Wearing a creased T-shirt under his hoodie, a gaunt-looking Bevan Abrahams sank into his seat, holding his face in his hands and swaying slightly.
"Is he okay?" the magistrate asked, concerned.
His attorney, Kirvin Adams, submitted that his client had a medical condition and had been given his medication late.
Abrahams faces charges of the illegal possession of a firearm and ammunition and resisting arrest.
On Wednesday afternoon, a Capitec administrative office in Voortrekker Road was evacuated as police tried to talk down a gunman who had apparently locked himself in.
Abrahams' lawyer told News24 outside of court that he could not confirm or deny a report in Die Son that Abrahams was upset about an investment that an ex-girlfriend allegedly removed from his account. The case was still in its early stages and Adams had not been privy to the finer details.
Prosecutor Clifford Moatlhodi told the court that at this stage, bail was not opposed.
Abrahams would remain in custody until his bail application, but the magistrate instructed that he be kept in the hospital section of prison until then.
She also instructed that he be taken to a district surgeon for a medical examination.
Capitec communications head Charl Nel told News24 on Wednesday that it was aware of the situation at its BSC building in Bellville, where an armed person threatened staff.
"This is an administrative office and call centre where no cash is held on the premises.
"Capitec Bank employees have been evacuated and no employees or clients are in danger," Nel said via email at the time.
Western Cape police confirmed on Wednesday that the man had surrendered and that no one had been injured in the incident.