Updated

Authorities say a man who referred to himself as "a joker" and allegedly threatened to shoot up his workplace has been released from a psychiatric facility in Maryland.

A mental health court judge released 28-year-old Neil E. Prescott on Tuesday to the custody of his parents in Maryland's Prince George's County.

Prescott was ordered to continue taking medication and attending counseling while he awaits arraignment. He has been charged with one count of telephone misuse.

Police say that Prescott allegedly threatened pm July 27 to load his guns and shoot up his workplace. Police say they subsequently found large quantities of ammunition and about two dozen weapons in his apartment.

Authorities say Prescott can only leave his parents' home for medical or legal appointments.