Manuel Vázquez Montalbán

Creator of Spain's most famous fictional detective

Novelist Manuel Vázquez Montalbán, who has died at the age of 64, was the creator of Spain's most famous fictional detective, José "Pepe" Carvalho. Since his debut in I Killed Kennedy (1972), Carvalho's adventures have appeared in 22 novels in 24 languages. The writer was returning from a trip to Australia to polish the fine details of the last Carvalho novel, Millennium, when he died of a heart attack at Bangkok airport.

A novelist, poet, essayist, political commentator, playwright and humorist, Vázquez was born in Barcelona's seedy Barrio Chino neighbourhood just after the Spanish civil war. His father, a communist labourer, was imprisoned for five years after the war, and his anarcho-syndicalist mother was a seamstress. The author was passionate about Barcelona, especially its football club.

Vázquez won a first-class degree in philosophy and literature at the University of Barcelona, then took a job selling funeral insurance policies. A lifelong socialist, he joined the anti-Franco resistance in the student-based Popular Liberation Front and the Front Obrer Català, later becoming a leading member of the region's communist party, the Partit Socialista Unificat de Catalunya.

He began his journalistic career as a contributor to the Francoist newspaper Solidaridad Nacional, using opportunities such as an obituary for Ernest Hemingway as a platform for thinly veiled criticism of the regime. He also contributed extensively to the underground anti-fascist press.

In 1962, having taken part in a demonstration supporting a miners' strike in Galicia, the 23-year-old was jailed for four years by a military tribunal and tortured. An amnesty marking the death of Pope John XXIII freed him after 18 months, during which he managed to write a textbook on journalism that is still in use. His young wife, the historian Anna Sallés, was also imprisoned. After release, blacklisted from jobs in journalism, he worked as a researcher for the encyclopaedia publisher Larousse.

Manolo, as friends called him, emerged as a poet in 1967 with A Sentimental Education. Most of his verses were collected in the 1990 volume, Memory And Desire. Despite the ideological gulf, he admired TS Eliot's work and translated some of it into Spanish.

The launch of the progressive news magazine Triunfo in 1966 provided a new outlet for his work. He wrote essays on Spanish culture, later polished into one of his major books, A Sentimental Chronicle Of Spain. It was also in Triunfo that he developed his sharp, acrid style as an assassin of pomp, bullshit and mediocrity. In addition he wrote for a number of consumer magazines.

His creation Pepe Carvalho was born with a history. Coming from far-flung Galicia to work in the murky big city, Barcelona, was a start. He was an erstwhile communist and a former CIA agent; a sly and sarcastic hustler; a social psychologist, with ambiguous morals; and a Rabelaisian gourmet with a weakness for a charming prostitute called Charo. The character developed as times changed, becoming an observer who unravels small stories while deciphering the big picture and seeing how history affects individual lives. His sidekick, Biscuter, was also a complex character. Vázquez likened the duo to Don Quixote and Sancho Panza.

The Carvalho novel Southern Seas (1978) won the Planeta prize, Spain's richest literary award. Vázquez earned many other garlands, including the National Prize in Letters, the French Prix International de Littérature Policière, the Raymond Chandler prize and several honorary doctorates.

His journalistic output was prodigious in quantity, and of a consistently high standard. Major European titles such as La Repubblica, Il Manifesto and Le Monde Diplomatique vied for his byline, along with La Vanguardia and the Catalan newspapers El Periódico and Avui, the risqué newsweekly Interviú and the Madrid daily El País.

Much of his journalism was collected in book form but still awaits translation, including Lunches With Troublesome People, A Polish Visitor In The Court Of King Juan Carlos and his reflections on the Pope's visit to Cuba. The Autobiography Of General Franco (1992) casts Vázquez as a ghost-writer for the dictator's memoirs. His commentaries on José María Aznar's government were so acerbic that the pious official condolences on his death must be taken with a pinch of salt.

Vázquez wrote six or seven newspaper columns at a time. When he went into hospital nine years ago for a quadruple heart bypass - "a spot of cardiac plumbing" as he put it - he had enough articles stacked up to meet each deadline during his treatment. He still has several books lined up. A recent one covered his dialogue with Subcomandante Marcos of Mexico's Zapatista movement. A forthcoming essay on Spain's conservative government, entitled Aznaridad (roughly, what it means to be Aznar), promises a deliciously scabrous hatchet job, and another poetry volume is due. But in the long run, his fame will rest on the gumshoe, Carvalho, whose final adventures take in the Afghan and Iraqi conflicts and last year's Bali massacre.

Most critics agree that none of Pepe Carvalho's screen incarnations to date have measured up to Vázquez's literary creation. The same applied to his other works. Vázquez declared after the premiere of Galíndez, based on his award-winning 1990 novel: "It's a film I could probably have considered quite good, except that I wrote the damn novel."

Although he wrote mainly in Castilian, he was looking forward to the publication of the whole Carvalho series in Catalan. Food was another passion. Vázquez wrote an authoritative history of Catalan cuisine, and in his Raval neighbourhood he was part of the furniture at the restaurant Casa Leopoldo.

He is survived by his wife, Anna, and their son, writer and film-maker Daniel.

· Manuel Vázquez Montalbán, novelist, journalist and poet, born July 14 1939; died October 18 2003