Judge Penalva (above) concludes his investigation shrouded in secrecy, which could yet see prominent public officials being cited. | A. Sepulveda

It started on 12 September, 2013. Investigating judge, José Castro, ordered a search of Palma local police headquarters by the Guardia Civil. The context, we were to learn, was the alleged rigging of police exams. From that beginning, the investigation widened. It has become the single most intensive investigation of a Spanish local police force. The claims of corruption have brought with them charges of extortion, bribery, membership of a criminal organisation. The sleaziness of the whole affair involves prostitutes and drugs.

A police "mafia" has operated in Palma, so has suggested Judge Manuel Penalva, now overseeing the case. Penalva has been authorised to carry a gun for his own protection. So has a prosecutor, Miguel Angel Subiran. Threats have been issued. Penalva has referred to "honest cops" who are not just fearful but terrified at potential reprisals for giving evidence. Protection has been given to witnesses, which include businesspeople and employees of establishments as well as the "honest cops" and even an acknowledged criminal. Coverage of court proceedings have been subject to a gagging order. There are currently fourteen police officers in jail: nine of them in Palma and five who have been transferred to the mainland. The police force is at loggerheads with the town hall. Two chiefs of police have been dismissed in the space of a few months. New revelations appear to surface daily in what has become a case of shocking importance to Palma, its police and to Majorca.

The affair has been rumbling along for months, but in the past week or so it has reached ever more extreme heights. The now ex-chief of police, Antoni Morey, took to Facebook to express his view that the whole of the force was being tarnished and undermined by the case (the allegations have centred principally on two units within the force). He also criticised the courts and local politicians. His dismissal was inevitable - he had wanted to resign but legal procedure doesn't allow for resignation. Earlier this week, Judge Penalva went so far as to suggest that Morey could be guilty of sedition and then turned his sarcasm on the former police chief, insinuating that Morey himself may have been involved in a litany of acts that the judge then reeled off. Beatings, mistreatment of women, private drugs and sex parties. Morey had chosen to criticise the judicial process, and the judge was getting his own back.

At the same time, further arrests were being made. They included the police union representative, Jaume Garau. He had previously been detained. The "honest cops" had been making reference to a union representative who had been making life difficult for them, though the original detention was a threat that Garau was alleged to have made against El Ico, the son of La Paca from the notorious drugs gang in Palma's Son Banya. A couple of weeks ago, El Ico testified to Penalva and Subiran that he had been threatened while he was in prison by an unnamed "funcionario" who is now also in prison.

Penalva was particularly alarmed by an anonymous letter sent to Palma's councillor for public safety, Angelica Pastor. Penalva concluded that it had to be authentic and was from a police officer implicated in the case. The letter told Pastor that she was playing with fire (she is restructuring the police force, bringing in new procedures and has of course had her issues with Morey). It said that "we are very good friends of two officers who are in jail because of you". It went on: "We are ready. You are a whore. Go f*** yourself (with old police officers)."

The judge has extended his secretive investigation by a further month, but all the time the tension created by the affair grows. The National Police have now ordered even more security for protected witnesses and have stepped up their vigilance of judges, prosecutors, certain businesspeople and journalists.

To add to all this, politicians are now being dragged into the affair and being implicated with alleged involvement with the police corruption. The judge has not named names, but two whose names have been mentioned are highly prominent members of the Partido Popular in Palma. Judge Penalva believes that there is sufficient evidence to link politicians (former ones) at the town hall with promotion of certain officers cited in the affair. He insists that these politicians enjoyed similar benefits to those which officers from the local police force had, namely free drinks and the services of prostitutes in Playa de Palma.

The judge also makes reference to what is almost a sub-plot to the whole affair, the existence of an organisation of corrupt public officials who had political protection in Calvia, from which was to stem the arrest of the former chief of Calvia police, José Antonio Navarro.

The murkiness of this whole business just gets murkier by the day. One of those accused has been described as a "very violent person" who has even made threats against the Guardia Civil. The next few weeks, as Judge Penalva concludes his investigation shrouded in secrecy, could yet see prominent public officials being cited. If so, then the scandal will only become greater, as will the need for a thorough overhaul of Palma's police, one that Pastor is attempting. Palma needs this, as does Majorca.