THE scandals have come thick and fast. On February 18th news leaked that two NCOs in Peru’s naval intelligence agency were being tried in a military court for selling information to Chile. That came days after several political foes of Peru’s president, Ollanta Humala, complained of being spied on by the National Intelligence Directorate (Dini). In January two former Panamanian security chiefs were arrested on charges of spying on scores of citizens for Ricardo Martinelli, a former president.

In Colombia, government negotiators conducting peace talks with the FARC guerrillas had their communications hacked last year, seemingly by army intelligence agents. The former director of the country’s now dissolved Department of Administrative Security (DAS) faces trial for illegal phone tapping of adversaries of Álvaro Uribe, a former president.

Argentina’s president, Cristina Fernández de Kirchner, accuses a sacked former intelligence chief, Jaime Stiuso, of inspiring the recent accusation by Alberto Nisman, a prosecutor, that she and her foreign minister colluded with Iran to suppress the truth about the 1994 bombing of a Jewish centre in Buenos Aires; she also hinted that Mr Stiuso was behind Mr Nisman’s subsequent death in January. In Venezuela, the government sent intelligence agents to arrest the mayor of Caracas, Antonio Ledezma. In the dungeons of the service’s forbidding grey marble headquarters in Caracas, several student leaders are still incarcerated after anti-government protests last year.

There is an odd one out in these cases. If Chile’s navy has indeed spied on its Peruvian counterpart, which its government denies, that is hardly unusual. It would be surprising if Peru’s armed forces did not run agents in Chile. The two countries have long mistrusted each other, though relations have recently improved. If not exactly legitimate, secret information is often useful in apprising countries of the intentions of others.

All the other cases are symptoms of two Latin American diseases: the partisan abuse of intelligence services by governments to spy on political opponents, and a tendency for spy agencies to pursue their own agendas. In many cases such behaviour dates back to the dictatorships of the 1970s that fought the cold war against local communists and Cuba (which has by far the most efficient intelligence services in the region). With democracy restored, Chile, Uruguay and Brazil all set up new, civilian, agencies, which specialists say are professionally run. Juan Manuel Santos, Colombia’s president, has set up a new service to replace the discredited DAS.

Elsewhere bad habits remain. Venezuela’s Sebin is “into anything, including assassinations”, says a Western intelligence analyst. In Peru Vladimiro Montesinos, the sinister spy chief in the 1990s who is now in jail, used the intelligence services for extortion, drug-trafficking, the smearing of opponents and manipulation of the mass media. They were too busy to warn of an Ecuadorean invasion of Peru in 1995. Dini has not shaken off Mr Montesinos’s legacy. It has 400 well-paid agents, many of them army pals of Mr Humala, when all it needs is 50 or so professional civilian analysts, says Fernando Rospigliosi, who briefly supervised it in 2002.

In 2002 Argentina supposedly reformed its intelligence agency, set up by a former Nazi agent under General Juan Perón in the 1940s. The Intelligence Secretariat (SI), as it is now called, is a monster with at least 2,000 employees and a budget of $214m last year. In theory but not in practice, it is overseen by a congressional committee. Judges, who are also supposed to supervise it, depend on its help in their investigations. So do presidents and provincial governors: under Ms Fernández and her husband and predecessor, Néstor Kirchner, the SI devoted itself to spying for them, according to the Western analyst. That was until Ms Fernández fell out with Mr Stiuso. She now plans to replace the SI with a new agency, but there are fears that the reformed set-up may be no more accountable.

These shadowy powers of state have no place in a democratic Latin America. The region should ask itself what it needs spies for. Armies and police do operational intelligence work, respectively on foreign powers and on drug gangs and the remaining subversive groups. Much strategic intelligence can now be bought commercially. If the intelligence services are misused or out of control it is often because the politicians have failed to give them clear tasks. Few have the interest or expertise to do so, notes Harold Trinkunas, a security specialist at the Brookings Institution, a think-tank in Washington, DC. It is high time they developed them.