CUERNAVACA, Mexico (AP) _ Argentine writer Manuel Puig, who gained international fame for his novel ''Kiss of the Spider Woman,'' died of a heart attack Sunday. He was 57.

Puig, who was suffering complications from gall bladder surgery, had earned a reputation as a leading member of the younger generation of Latin American writers for his novels written in a cinematic, non-narrative style.

His works often explored the relationships between his characters' impoverished lives and their rich, if unfulfilled, fantasies.

A lifelong film buff, Puig turned away from a potential career as a filmmaker to devote himself to literature. But his literary style reflected the influence of screenplays - with hardly any descriptive prose but lots of unadorned conversations, soliloquies and internal monologues.

''I mostly hear the action,'' Puig said in a 1985 New York Times interview. ''When I started writing, I found I trusted more the language of the characters than the first person.

Puig wrote several novels, and some were later made into successful movies. Among them are ''Kiss of the Spider Woman,'' ''Betrayed by Rita Hayworth,'' ''Eternal Curse on the Reader of These Pages'' and ''Heartbreak Tango.''

Brazilian filmmaker Hector Babenco's 1985 film version of ''Kiss of the Spider Woman,'' starring William Hurt and Raul Julia, brought the novelist a larger international audience. Hurt won an Academy Award for that performance.

The novel ''Kiss of the Spider Woman'' was set in a bleak Argentine prison cell shared by a Marxist guerrilla and a homosexual. Their dialogue is interspersed with the homosexual Molina's recounting of plots of romantic movies.

Puig also wrote numerous plays and movie scripts over the last 30 years.

He was born on December 28, 1932, in the small town of General Villegas, on the arid pampas of Argentina. As a youth, he spent much of his free time in the local movie theater watching popular American and Argentine films that influenced his later work.

In 1946, he went to Buenos Aires to attend an American boarding school. Four years later, he enrolled at the University of Buenos Aires, where he studied philosophy.

After leaving the university, Puig won a scholarship to study film in Italy in 1956 and went on to work on several films. His futile attempts at writing screenplays led him into literature.

''I didn't choose literature,'' he recalled in the New York Times interview. ''Literature chose me. There was no decision on my side. I have never, never fantasized about writing fiction. My only fantasy about writing was that in my old days, after directing many masterpieces, I would write my memoirs.''

One failed attempt at a screenplay in 1961 developed into the autobiographica l novel, ''Betrayed by Rita Hayworth,'' about the influence American movies have on the people of a small Argentine town. It was completed in 1965 but published three years later, partly because of problems with censorship.

It was panned by Argentine critics, but received more favorable reviews in France and the United States, and Puig began writing more novels.

With the return of Juan Peron to power in Argentina in 1973, Puig felt increasingly alienated from his country. He went into self-imposed exile, eventually settling in Mexico, where he wrote ''Kiss of the Spider Woman.''

After spending two years in Mexico, he left in 1976, partly because of a heart condition, and moved to New York City. He later settled in Rio de Janiero, Brazil.

When he died, Puig had just finished revising the English translation by Susan Jill Levine of his most recent book, ''A Tropical Nightfall,'' his son, Javier Labrada said in an inteview in Mexico.

His son said a volume of his father's plays is about to be published in Spain by Seix-Barral. Among his screenplays are ''Madrid 1937'' and ''Under a Mantel of Stars.''

In addition, Puig's play ''Mystery of the Rose Bouquet'' was recently produced in Los Angeles.

He is survived by his mother, Maria Elena de Puig, a brother Carlos Puig, Labrada and another son Agustin Garcia Gil, all living in Cuernavaca.

Puig had lived in Cuernavaca, 50 miles south of Mexico City, since October.

His funeral was held there Sunday night. He will be buried in a family plot in La Plata, Argentina, Labrada said.