LYING between Colombia's coca bushes and Mexico's cocaine traffickers, Central America is a choke point on the drugs trail. In 2010 the smugglers ensured that Honduras, El Salvador, Belize and Guatemala were among the world's seven most violent countries. Costa Rica and Panama are richer and safer. But since 2007 their murder rates have respectively risen by a third and nearly doubled.

Amid this inferno Nicaragua, the poorest country in mainland Latin America, is remarkably safe. Whereas Honduras's murder rate in 2010 was 82 per 100,000 people, the world's highest in over a decade, Nicaragua's was just 13, unchanged in five years. That means it is now less violent than booming Panama, and may soon be safer than Costa Rica, a tourist haven. What explains the relative peace?

Spending is not the answer. With a GDP per head of $1,100, Nicaragua can afford only 18 policemen for every 10,000 people, the lowest ratio in the region. (Panama has 50.) Earning $120 per month, its officers are also the worst-paid. Nor does Nicaragua spend much on prisons: it jails just 120 people per 100,000, compared with 390 in El Salvador. This may work in its favour: El Salvador's violent mara gangs look for recruits in the country's packed prisons.

Nicaragua's distaste for its neighbours' mano dura (“iron fist”) policies grew out of the 1979 revolt against the Somoza dictatorship. “We didn't know how to be police. We only knew we didn't want to be like the Somozan Guard,” says Aminta Granera, a former nun and guerrilla who leads the force. Officers are aided by 100,000 volunteers. They include law and psychology students; 10,000 former gang members, who mentor youths via baseball in the barrios; and nearly 4,000 domestic-violence victims, who persuade women to speak out. Amnesty International, an NGO, highlights the frequency of rape, which is made worse by a blanket ban on abortion: last year a 12-year-old was forced to give birth to her stepfather's baby. Still, confidence in the police is the highest in Latin America after Chile.

The drug war could yet reach Nicaragua. The country's low wages may attract kingpins just as they have wooed legitimate investment: smugglers charge under $500 to drive a car of cocaine from Managua to Mexico. The gangs may only have been kept out by the country's ropy ports. The police say they broke up 14 drug-trafficking cells in the first half of 2011 alone, up from 16 in all of 2010 and one or two a year until 2005. Ms Granera says that such plots often include Mexicans. The Zetas, a brutal Mexican mob, could easily ignite more violence if they move in.

A cloud hangs over the police's leadership. Ms Granera is justly popular. But like many officials in Daniel Ortega's government, she has ignored the limit on her five-year term. That deadline passed in September, only for Mr Ortega—who himself began an unconstitutional third term this month—to reappoint her. The opposition complains that the police do little to stop the periodic rampages of mobs loyal to Mr Ortega: in 2010 a Holiday Inn was attacked with makeshift mortars while the opposition held a meeting there. Mr Ortega has already hollowed out most Nicaraguan institutions. It would be a crime if the country's police suffer the same fate.