On 16 June, ten days after the second round of presidential elections, the ONPE (the agency charged with administering elections) declared officially that, with 100% of the votes accounted for (votos contabilizados), Pedro Castillo had won with 50.125% to Keiko Fujimori’s 49.875%, a margin of 44,058 votes. This is very close to and slightly higher than the small margin by which Pedro Pablo Kuczynski beat Fujimori in the second round in 2016.

This is not where the story ends, however. The Jurado Nacional de Elecciones (JNE) has been called upon to examine a mass of impugned voting tallies presented to it by Keiko’s battery of lawyers. As we went to press, the decentralised Special Electoral Juries (JEEs) had rejected outright 100% of the cases put before them by the Fujimori camp. Fujimori can still appeal against this.

Most JNE members have also stood firm against the daily harassment to which they have been subjected by Keiko’s followers. It now remains, once all appeals have been heard, for the JNE officially to declare Castillo president-elect. His opponents will then need to decide whether to accommodate themselves to a left-of-centre government – as was the case in 2011 with Ollanta Humala – or to support some sort of coup.

Many of the cases submitted to the JEEs were ruled out because they were not lodged before the official deadline. But not content with this, a former head of the Supreme Court, Javier Villa Stein on 18 June took legal action against both the JNE and the ONPE, accusing them of responsibility for what he claimed was “an electoral process vitiated by diverse actions that denied [expression of] the popular will”.

Stein claims that the elections gave rise “to a grave political crisis that has weakened our institutions and polarised Peruvians to the point of putting in doubt the continuity of the rule of law and maintenance of peaceful coexistence in our country”.

Such an attack on the country’s electoral institutions further ratchets up the political tensions caused by Fujimori’s refusal – as in the past – to acknowledge defeat. A massive protest march was due to take place on 19 June against the tactics employed by Fujimori to string out a final official ratification of Castillo’s victory.

For much of last week, the Fujimori camp has been mobilising its militants to congregate around the homes of people it sees as having leverage, including the head of ONPE and the Ombudsman, let alone journalists and other commentators who have refused to swallow the argument that the 6 June election was fraudulent.

Claims of fraud now are giving way to demands on the far right that the elections should be re-run. The Lima ‘establishment’, or at least significant sectors of it, seem prepared to go to any lengths to stop Castillo becoming president. Steven Levitzky, from Harvard University, a savvy observer of the Peruvian scene, believes that it is now not so much a matter of what Keiko Fujimori wants but what business elites want. “There are sectors of the business and media elites who will do anything to [ensure] that Keiko Fujimori gets to power” he is quoted as saying.

At the same time, retired members of the military hierarchy have, once again, pitched in. On 17 June, a communiqué was published with the signatures of 400 retired army officers, 600 from the navy and 300 from the air force. The document urged those on active service not to recognise Castillo as president once the JNE recognises him as having won the election. Such a blunt, overt call for a military coup has no precedent in recent Peruvian history.

The defence ministry hastily issued a statement saying the document was “apocryphal” in view of the fact that five of those signing were apparently dead. Despite such denials, President Francisco Sagasti on 18 June in a message to the nation said that such letters from retired military were “unacceptable”. He declared that “as constitutional president of the republic, I reject these sort of communications that are not just contrary to democratic values and institutions but are acts at odds with the constitution and the laws”. He said that he would refer those who signed the letter to the public prosecutor.

The fears being whipped up by Fuerza Popular and its allies, using social media to communicate their messages along with multiple instances of ‘fake news’, reflect those who see their traditional dominance over policy making being whittled away. Peru has long been a cauldron of unresolved social and racial tensions, and Castillo is emblematic of the Peru which has been effectively excluded from political power.

An eloquent (as always) cartoon by Carlín in La República captures that feeling, with well-off Peruvians sitting round the swimming pool and wondering how the “ignorant” poor might want to change Peru’s economic model in view of all the “success” it has generated.