Several factors had tipped Portugal over the edge in 1974: unwinnable colonial wars, soaring inflation and widespread labour unrest. On 25 April, the Armed Forces Movement (MFA) seized power, with virtually no bloodshed. The swift dénouement found the PCP poised to share power, a strange twist for a party whose central committee members had shared more than 300 years in jail. Cunhal was greeted at the airport on his arrival from Moscow by military top brass as well as a cheering crowd.
In the first provisional governments (1974-75), Cunhal took a seat without portfolio, and he tried to soften the PCP's image by dropping the phrase "dictatorship of the proletariat" from its programme. He worked closely with the MFA premier, General Vasco Gonçalves (who died just two days earlier - obituary in The Guardian, 13 June 2005) against a chaotic background of insurrectionary initiatives and swift decolonisation in Africa. Cunhal concentrated on expropriating monopolies, nationalising banking and insurance, redistributing vast landed estates and preparing for the polls.
In the 1975 constituent assembly election, the new Socialist party (PS) gained 38% of the vote and the PCP just 12.5%. Cunhal was elected to the assembly, and then to six successive parliaments, his last being that of 1987-91. He was on the Council of State for 10 years from 1982.
The PCP vote shrank, until a spell in opposition to a minority PS government helped it regain some ground in 1976-78. But by the end of the 1980s, many socialist measures of the revolutionary period had been undone, and the PCP was no longer a contender for power at the national level.
Cunhal personified the PCP, remaining its leader until 1992. The discipline he instilled in the underground party, the mainspring of the anti-fascist resistance, ensured its survival, but burdened it with an entrenched culture of dogmatism and hostility to internal debate.
Born in Coimbra, his father a liberal lawyer and his mother a devout Catholic, Cunhal was 15 when António de Oliveira Salazar became finance minister, the vital stepping stone to his becoming prime minister in 1932, and the dictatorship embodied in his authoritarian constitution of 1933. Cunhal enrolled as a law student at Lisbon University when he was 17, immediately joining the PCP, and by his early 20s was head of the Young Communists and a member of the party leadership.
His first imprisonment was from July 1937 to June 1938. Jailed again for a time in 1940, he was escorted from prison to defend his brilliant doctoral thesis. One law professor congratulated him, adding: "What a shame that you're a communist." That was Marcelo Caetano, Salazar's righthand man.
In 1942 the party leader, Bento Gonçalves, died under torture, from which point Cunhal was leader in all but name, acting as central committee secretary from that year until 1949. He soon reorganised the party, emphasising security and unity.
Throughout the dictatorship, the party's newspaper Avante! was printed with clockwork regularity on its own clandestine presses. Cunhal wrote on social and cultural issues under several pseudonyms. The PCP's civil agitation during the second world war provoked strikes, overtime bans and hunger marches.
During the cold war, Salazar intensified his efforts to suppress communism. Arrests were often followed by prisoner "suicides". When Portugal's most wanted man was captured in 1949, the fascist press rejoiced. Under interrogation, Cunhal remained stubbornly silent. He got a lengthy jail term and Salazar's political police boasted that the PCP was a spent force.
Cunhal was moved to the top-security fortress of Peniche, on Portugal's Atlantic coast. One night in January 1960, he and nine other prisoners drugged a jailer and abseiled down the walls to waiting getaway cars. Cunhal carried off some of his drawings, later published by the PCP, mostly depicting rural life and labour. As a propaganda coup, the Peniche escape was unmatched until December 1961, when another seven PCP inmates drove straight out of Caixas jail, near Lisbon, in an armour-plated car.
On the run, Cunhal was formally appointed party general secretary in 1961. There was some catching up to do, not least with the Soviet party's 1956 renunciation of Stalinism.
Cunhal persuaded the PCP to forget waiting for the régime to crumble of its own accord. New resistance forces were emerging from many angles. A rise in labour militancy created an unstable climate, stirred by hijackings, coup polts and the beginning of the end of empire. India repossessed Goa in 1961, and soon the fuse was lit under Angola, Guinea-Bissau and Mozambique.
Cunhal left Portugal late in 1962, and in 1964 wrote the main PCP strategy document of the era, encouraging rebellious undercurrents beyond the party heartlands. It highlighted dissatisfaction in the armed forces, which were soon swallowing half the budget and sending ever more conscripts into battle. Cunhal spent his exile in Moscow or Prague, with sallies to Algiers and Bucharest, where Radio Free Portugal was based.
In 1968, Caetano succeeded Salazar, and Cunhal's pioneering study, The Agrarian Question in Portugal, exposed how the population of a country rich in resources was submerged in poverty. He approved of the Soviet intervention in Czechoslovakia that year, reinforcing the PCP's hardline image abroad. In the early 1970s, the party experimented with armed struggle, sabotaging a warship, the secret police training school, an air base and utilities, and found kindred sprits in the MFA who were able to effect the revolution the PCP had been working towards for so long.
After becoming an honorary president of the PCP at the age of 79, Cunhal never fully retired, chipping in to debates between the party's modernising currents and a leadership that squeezed out some of the brighter talents and saw a steep decline in membership.
Belatedly, he revealed his alter ego as a prolific creative writer in the neo-realist tradition. An unknown author, Manuel Tiago, had produced a trilogy of novels about the anti-fascist resistance: in 1994, Cunhal owned up. He retained the pseudonym for further novels and short story collections, and once wrote: "None of the stories happened quite as they are told here... every one of them is fiction, yet they are all true." An essay on mediaeval class conflict in Portugal was republished in 1998; another, on art in society, in 1996.
His translation of King Lear was undertaken secretly in prison and first appeared under the pseudonym Maria Manuela Serpa. It was published under his own name in September 2002, by which time the old revolutionary, with his gaunt face, shock of white hair and beetling eyebrows, was a familiar presence at literary round tables and on talk shows.
He is survived by Ana, the daughter of his relationship with Isaura Maria Moreira, and by Fernanda Barroso, his partner in later life.
- Alvaro Barreirinhas Cunhal, politician, born 10 November 1913; died 13 June 2005