TO LOSE one prime minister might be considered a misfortune, but to lose six in less than four years in office, as Peru’s president, Ollanta Humala, has done, must be seen as carelessness.

The loss of the sixth, Ana Jara, who was censured by Congress on March 30th by 72 to 42 votes, was by far the most painful.

Mr Humala’s previous prime ministers resigned or were sacked. Ms Jara was the first to be censured by Congress since 1963. She was held responsible for a scandal in which the national intelligence agency was alleged to have spied on political opponents and gathered information on properties owned by more than a hundred prominent Peruvians.

Ms Jara was in many ways victim rather than perpetrator. In eight months in the job she showed deftness. While the spies formally report to her, it is no secret that Mr Humala, a former army officer, staffed the agency with friends from the army.

It is a French-style quirk of Peru’s constitution that the directly elected president appoints a prime minister who is accountable to Congress. The system works smoothly when the government has a clear programme and a legislative majority. But Mr Humala is prone to zigzags. His hold over Congress was never more than tenuous; now it is gone.

Ms Jara’s departure could precipitate a minor constitutional crisis. If Mr Humala’s nominee to replace her is rejected, he can dissolve Congress, causing a legislative election. But with presidential and congressional elections due in April 2016, that would subject Peru to unnecessary upheaval. Mr Humala would be wise to appoint a conciliatory figure as prime minister. And having made its point, the opposition would do well not to push it.

Ms Jara’s censure underlines Mr Humala’s isolation. Accustomed to top-down command in the army, he admits that he has found the presidency “a challenge”. He has overseen rising crime and an economy that is slowing after a dozen years of rapid growth. More encouragingly, investment in infrastructure has risen and some of his social policies have been enlightened. Mr Humala’s approval rating of 25% is respectable in a country where few politicians are loved.

He says his priority for the rest of his term is social inclusion.

Even assuming that Congress approves Ms Jara’s replacement, the risk for Peru is that political drift will cause investment to tail off until after the election. Already several big mining projects are on hold—in some cases because of falling world prices, in others because of the government’s failure to resolve social conflicts.

Much depends on who is elected to replace Mr Humala, who cannot run again next year. Polls make Keiko Fujimori, the daughter of Peru’s disgraced autocrat of the 1990s, the early front-runner. She has sharper political instincts than the president, but much still to prove.