The Spanish general elections last October all but obliterated Spain's Communist Party as a political group of any significance. A number of books recently published here so tarnish the image of the party and of its longest serving leader, Santiago Carrillo, that any resurrection of organized communism in Spain would appear to be a long-term prospect.

That the Spanish Communist Party is at present discredited and politically bankrupt in Spain is not in dispute. The October elections reduced the party strength in the 350-member Congress from 23 to 4--a humiliating setback that prompted the resignation of Carrillo as the party's secretary general. Two books by former senior party officials suggest that flaws in Spanish communism, exacerbated under Carrillo's leadership, preclude any recovery.

The new literature on Carrillo and the Spanish Communist Party is particularly damaging to both because it is a broadside attack by respected Marxist intellectuals on the future of Eurocommunism--the theory of independence from Moscow, acceptance of political pluralism and socialism "with a human face." Carrillo claims to be a founder of Eurocommunism and argues that it is an original and valid contribution to the Communist movement in Western Europe.

In the specifically Spanish context, the riddle posed by the Communist Party is how, having been the most organized, disciplined and steadfast of the opposition groups throughout the 40 years of Francoism, it failed miserably in electoral terms once democracy was restored and bans on political activity were lifted. The Spanish Communist Party lags well behind its Italian, French and Portuguese counterparts.

In a weighty biography, "Santiago Carrillo: Chronicle of a Secretary General," Fernando Claudin, who was purged from the party in 1964, blames the party leader for the Communist demise in Spain. In "The Crisis of Eurocommunism," Manuel Azcarate, who was purged in 1981, charges Carrillo with failure to overhaul communist theory and practice along genuine Eurocommunist lines.

The two books build on the first significant attack on Spanish communism written from the inside--"The Autobiography of Federico Sanchez," a bitter documentary novel by Jorge Semprun, who was expelled from the party's Politburo alongside Claudin in the mid-'60s. Semprun depicted Carrillo as a Stalinist and the 1977 book was a runaway best-seller in Spain.

Fueling the present anticommunist literature for the Spanish public is "The Heretics of the PCE" (the initials stand for the Spanish Communist Party) by journalists Pedro Vega and Peru Erroteta. The authors, both disillusioned Communist sympathizers, trace the exit from the party of numerous intellectuals and white-collar members during the post-Franco period. They conclude that Eurocommunism was little more than a propagandistic ploy and that the party leadership remained authoritarian and suspicious of renewal.

The current nonfiction bestseller is a historical whodunit that investigates the mass shootings of rightists in the village of Paracuellos del Jarama, close to Madrid, when the capital was besieged by Franco's insurgents at the start of the Spanish Civil War in 1936. In "Paracuellos, What Happened," Madrid-based Irish author Ian Gibson marshals considerable evidence to argue that the Communist militiamen, directed by Soviet Comintern agents and with the knowledge of Carrillo--who at the time was responsible for internal security in Madrid--perpetrated the massacre of more than 1,000 rightist prisoners.

Gibson's book has revived the controversy over Carrillo's involvement in the Paracuellos atrocities. Carrillo denies that he had any knowledge of the shootings. Claudin, who was a close colleague of Carrillo during the Civil War siege of Madrid, maintains in his biography that there is no definitive proof of such involvement and suggests that the accusations were engineered by Francoists to discredit the Communist leader.

The chief charge leveled by Claudin at Carrillo is that he failed to understand the impact of economic development under Franco, particularly from the late '50s on, and was incapable of developing a coherent Communist strategy for the post-Franco transition. Carrillo ignored the reality of a burgeoning and increasingly affluent middle class, says Caudin.

By this account, Carrillo's self-delusions meant that for the greater part of his leadership--he became secretary general in 1960 but in effect had been running the party since 1956--the Communist effort was directed at organizing a succession of abortive general strike movements. Carrillo, who was in exile during Franco's rule, returning in 1976, is said to have misjudged the strength of the party inside Spain and failed to see the power of the Socialist Party.

In the first democratic elections, held in 1977, Carrillo said he expected to capture more than 20 percent of the national vote. He got barely 9 percent and the Socialists received close to 30 percent. Last October, Felipe Gonzalez' Socialists gained 48 percent of the electorate and an absolute legislative majority; the Communist vote was 3 percent.

Both Claudin and Azcarate consider in detail the autocratic manner in which Carrillo exercised his leadership. Azcarate, who was the party's chief foreign affairs spokesman at the time of his expulsion, portrays Carrillo as a man of extraordinary vanity who demanded complete obedience and was infuriated by any form of internal dissent or disagreement.

Azcarate formed part of what was known as the "renovating tendency" in the party, a group which urged greater criticism of the Soviet Union and genuine internal party democracy. Those among the renovators who were not purged, as Azcarate was, left the party in increasing numbers during the late '70s. "I discovered that almost the totality of the students that I had known in the '60s had left the party," Azcarate writes of his final days as a Central Committee member.

Communism and Carrillo had ceased to be attractive to Spanish radicals. Claudin writes: "The Communist label itself is irremediably tied to the historical record of communism in power. It would appear highly improbable that with such a label the party will be able to carry out any relevant role in the struggle for socialism in mature capitalist societies."