An 18-year-old Eritrean man was arrested early on Monday after breaking into a private residence in Marsa.
Police officers were called on-site, at it-Telgħa tal-Giżwiti, at 2.30am, after being alerted by the residents themselves.
They found the young man in the yard and he approached them yielding a hammer. The officers used a taser to eventually arrest him.
The man, who was carrying cannabis, was taken to the Floriana lockup.
At around 5am he tried to self-harm but was immediately stopped by the officers guarding the cell, the police said in a statement.
He was taken to hospital while police investigations are ongoing.