The Algerian state is in crisis. The popular refusal to accept a fifth term for President Abdelaziz Bouteflika has immense constitutional implications and confronts the army commanders with a massive dilemma. Public opinion is not repudiating Bouteflika personally; it is indignantly rejecting the suggestion that, in his permanently crippled, wholly incapacitated condition, he should be considered eligible for another five years in office. The Algerian people are defending the constitution, not violating it. Article 102 clearly defines the procedure to be followed ‘whenever the President of the Republic, because of serious and enduring illness, finds himself unable to exercise his functions’. This should have been set in motion long ago.

Following a stroke in April 2013, it was clear that Bouteflika was already incapacitated when he sought a fourth term in 2014. Public opinion was slow to react then, in part because the scandalous nature of what was happening had not fully dawned on people. But the notion that the decision-makers could try it on yet again, five years later, when Bouteflika’s incapacity had long been evident, was the drop that made the vase overflow. The problem for the army is that, in rejecting a fifth term for Bouteflika, the people are rejecting the army commanders’ preferred option and challenging the generals’ hegemony over the state.

Unlike local and legislative elections – which, however imperfect, are indeed elections – what Algerian officialdom calls presidential elections are not elections at all. There is no question of the ‘candidate of consensus’ failing to win and no possibility of the other people allowed to pose as candidates getting anywhere near his tally of votes. The real election is conducted well in advance of polling day by the high command of the Popular National Army (ANP), the source of political power. The decision is then tacitly proclaimed by the president-elect himself in announcing his ‘candidacy’, which is promptly supported by the state-controlled Party of the National Liberation Front (PFLN) and Democratic National Rally (RND), and the fix is in.

The function of the ‘election’ that follows is to dignify the decision already taken in secret conclave by implicating the public in it; and the function of the ‘election campaign’ is to stimulate the political reflexes of the people to motivate them to vote and, by voting, ‘adhere to’ the army’s decision and so reaffirm their allegiance to the state and the men who control it. The system proved acceptable to public opinion in the past, most notably in 1995, when millions willingly voted for Liamine Zeroual, but also in 2004, when Bouteflika’s second term was strongly supported. But it has now broken down, to the army’s acute embarrassment.

The demonstrators’ watchwords suggest they know they are tacitly challenging the ANP high command: ‘silmiya, silmiya’ (‘peaceful, peaceful’); ‘sha‘b wa shorta, khawa, khawa’ (‘people and police, brothers, brothers’); ‘jaish wa sha‘b, khawa, khawa’ (‘army and people, brothers, brothers’). They are clearly meant to be disarming, and have been effective so far. The ANP’s reaction has been hard to read: the chief of staff and deputy defence minister, Lieutenant-General Ahmed Gaïd Salah, has sent out mixed messages, vaguely reassuring at one moment, warning of the danger of instability and insecurity the next.

The editorial in the ANP’s magazine El Djeich on Friday was a striking instance of official flannel, claiming the people are, as always, at one with the army (that is, royally ignoring the people’s implicit criticism of the high command’s judgment), while committing the army commanders to no clear perspective or line of action at all. This suggests that the generals did not have a contingency plan if the Bouteflika option fell flat, almost certainly because he was their fallback option. There is a profound reason for this.

In December 2004, Bouteflika told a conference of the national war veterans organisation (ONM) that the era of historic or revolutionary legitimacy was coming to an end. This seems to have been intended to snub the ONM, but it was nonetheless true. Every president of Algeria has been able to claim a measure of historic legitimacy from his participation in the war of independence. Bouteflika’s declaration was not followed up at the time, but it should have been. If demonstrable revolutionary virtue could no longer legitimate the ANP’s choice of president, what would take its place?

Bouteflika returned to the theme in a speech at Setif in 2012, in which he memorably observed of the generation that fought the independence war and went on to rule the independent state: ‘Its garden has ripened’ (‘tab jnanou’). Once again, however, he shrank from exploring the implications of this: namely, that a quite different basis of legitimacy would be required for the succeeding generations of Algeria’s governing elite.

Only two clear options present themselves: either legitimation by the Western powers, who have so frequently arrogated to themselves the right to decide when a government is legitimate or not, or legitimation by the people. The first formula has already been at work in the Bouteflika presidency: his original sponsor in 1998-99 was Major-General Larbi Belkheir, France’s man in the Algerian elite. The extent of Paris’s hold over the Algerian presidency was made clear in December 2011, when the package of pseudo-reforms that were the centre-piece of the regime’s response to the ‘Arab spring’ was presented to the French National Assembly by the foreign minister, Mourad Medelci, as if the Algerian government were answerable to the French legislature. Any doubt about the true state of affairs should have been dispelled by the budget passed in late 2015, which contained measures that were clearly against the national interest while serving foreign interests, and prompted Zohra Drif and other veterans of the war of independence to alert the public to what the presidency had become.

The army commanders have been prepared to accept a degree of informal external influence and legitimation, because it has not infringed on their prerogative of choosing the president. The exhaustion of historical legitimacy means that their choices from now on will lack the indispensable ‘nationalist-revolutionary’ fig-leaf. But the recourse to national-democratic legitimacy will mean the end of their president-appointing powers and the generals may resist this.

They will have to give some ground, however. The ANP’s longstanding claim to be ‘the worthy heir to the ALN’ (the National Liberation Army of 1954-62) is now rivalled by the people’s claim to be the worthy successor of the revolutionary generation as a whole. The demonstrations have united Algerians as never before, transcending regional, generational, ideological and identity fault-lines, bringing together women (in huge numbers), men and children, leftists, liberals and conservatives, Islamists and secularists, Arabic speakers and Berber speakers.

There has also been an explicitly nationalist dimension to the demonstrations: the national flag has been everywhere; veterans of the war of independence – notably Djamila Bouhired and Zohra Drif – have been marching alongside their fellow citizens; and the ONM, long a pillar of the regime, has supported the protests. The demonstrators have not been repudiating the tradition of the national revolution that founded the state, but reviving and reinvigorating it. The slogan ‘El-Jazaïr jumhuriya, mashi mamlaka’ (‘Algeria is a republic not a monarchy’) is a protest against the virtual privatisation of the Algerian state by self-serving cliques and announces the people’s ambition to repossess it. But achieving this will be far from easy. As in the original national revolution, negating the discredited ancien régime is the comparatively easy part; constructing a viable alternative will be fraught with difficulty.

Both the army commanders and the Bouteflika camp know this. They have already floated the idea of conceding the protesters’ most immediate demand – no fifth term – by postponing the presidential election for ten to twelve months, in theory to allow time for a national conference to consider the constitutional changes that a refounding of the state as the ‘Second Republic’ will require. The problem with this is that Bouteflika would remain in office. Quite apart from his inability to discharge his normal presidential duties, a national conference convened in his name would have to be arranged by people with no constitutional authority to do so and could be widely contested.

An alternative ‘minimalist’ response would be for the army to decide to postpone the ‘election’ for only so long as it takes to prepare a plan B: exercising its historic prerogative, perhaps for the last time, it could propose a different candidate from the revolutionary generation to serve as a one-term president with the explicit mission of overseeing the process of constitutional reform. Possible candidates include the former prime minister Mouloud Hamrouche (76) and the former president Liamine Zeroual (77), both of whom served in the ALN, and the veteran diplomat and former foreign minister Lakhdar Brahimi, who is 85 but reported to be in good health.

The danger is that the regime will sow dissension in the popular movement by provoking a conflict between its pragmatic and maximalist wings. The government has often encouraged the radicalisation of popular protests in the past as a ploy to divide and rule, and it knows all the moves. The anonymous calls for a general strike which inundated social media over the weekend, and were partially followed, may be a case in point. The popular movement has no clear leaders who can negotiate on its behalf. Sticking to its peaceful strategy, and perhaps also accepting the satisfaction of its immediate demand as a basis for further claims later, while preserving its own unity, may be the wisest course.