Shiva Naipaul, whose searching novels and reportage about his native Trinidad and other countries in the Third World were widely celebrated, died of a heart attack Aug. 13 in London. He was 40 years old.

Though the works of his older brother, V.S. Naipaul, are better known, both wrote with an expatriate's sensibility. Born of Indian parents in Trinidad, both left for Oxford and settled in London.

Shiva Naipaul first gained attention with two novels, "Fireflies" (1970) and "The Chip-Chip Gatherers" (1973). Both books were set in Trinidad and explored class differences and family customs on the island. After publication of "The Chip-Chip Gatherers," Martin Amis wrote in The New Statesman that Mr. Naipaul's "next novels will establish him as one of the most accomplished, and most accessible, writers of his generation."

But there would be only one more novel, last year's "Love and Death in a Hot Country." The story is set in the fictional South African state of Cuyama, a desperate place where politics have become "banditry, cynicism and lies" and architecture has become "archways leading nowhere."

Such was Shiva Naipaul's sensibility: critical, severe, penetrating. Like his brother, he was obsessed with the theme of identity, of belonging to a country, a race, a people. Partly in pursuit of those themes, the Naipauls traveled all over the Third World.

While V.S. Naipaul traveled to India, Iran, Indonesia, Malaysia and elsewhere to produce, among other books, "India: A Wounded Civilization" and "Among the Believers," Shiva Naipaul went to Kenya, Tanzania and Zambia to write "North of South" (1979), and to Guyana to describe the mass suicide of the followers of the Rev. Jim Jones in "Journey to Nowhere" (1981). Some reviewers found Shiva Naipaul's generally bleak view of the Third World unsympathetic and unsparing.

His most recent book was "Beyond the Dragon's Mouth," published here this year by the Viking Press. In that collection of articles and essays, he described his journey from Trinidad to Britain and a career as a writer.

Mr. Naipaul was born in Port-of-Spain and attended St. Mary's College in Trinidad before winning a scholarship to attend University College, Oxford. His awards included The New Statesman Award and the Whitebread Literary Award. He was a fellow of the Royal Society of Literature.

In addition to his brother, survivors include his wife, the former Virginia Margaret Stuart, and a son.