Chaos broke out just before one o'clock when a National Police motorbike unit was patrolling the bustling square and stopped to help a couple of tourists.
As they were doing so, the officers were suddenly surprised by the attacker who threw himself on the back of one of the policemen armed with a large machete.
While other officers on patrol in the vicinity rushed to their colleague's aid, the attacker continued thrashing at the officer on the ground with the knife but fortunately, the policeman was wearing a stab vest which prevented him from being wounded.
Eventually, a group of colleagues managed to prize the attacker off the policeman while other officers began cordoning off the area while they dealt with the situation as scores of locals and holiday makers looked on in horror.
Now surrounded, the 33-year-old continued to lash out with the machete and was showing no signs of calming down.
In fact, he eventually attacked another officer but this time, a member of the Nation al Police drew his standard issue pistol, warned the attacker that unless he calmed down he would open fire.
The attacker, ignoring the warning, was subsequently shot in the leg and then subdued by officers. According to police sources, the arrested attacker has a police record for violence and resisting arrests.
Male nurse, Francisco Jose Taboada was first on the scene and administered first aid until an ambulance and paramedics arrived. I covered the wound and held it there until my colleagues arrived, he said. Don't want to enter into a debate about what happened but all I can say is that the National policeman did what he had to to defend himself.