The Colombian Nobel laureate Gabriel García Márquez, who unleashed the worldwide boom in Spanish language literature and magical realism with his novel One Hundred Years of Solitude, died at the age of 87. He had been admitted to hospital in Mexico City on 3 April with pneumonia.

Matching commercial success with critical acclaim, García Márquez became a standard-bearer for Latin American letters, establishing a route for negotiations between guerillas and the Colombian government, building a friendship with Fidel Castro and maintaining a feud with fellow literature laureate Mario Vargas Llosa that lasted more than 30 years.

Barack Obama said the world had lost "one of its greatest visionary writers", adding that he cherished an inscribed copy of One Hundred Years of Solitude, presented to him by the author on a visit to Mexico. "I offer my thoughts to his family and friends, whom I hope take solace in the fact that Gabo's work will live on for generations to come."

Colombian president Juan Manuel Santos said yesterday via Twitter: "A thousand years of solitude and sadness at the death of the greatest Colombian of all time. Solidarity and condolences to his wife and family ... Such giants never die."

García Márquez in Mexico City in March. Photograph: Edgard Garrido/Reuters

Journalists gathered outside García Márquez's house in Mexico City in the hope that one of the family members who was reportedly at his side would emerge.

Mexican president Enrique Peña Nieto expressed sadness at the death of "one of the greatest writers of our time," in the name of Mexico, the novelist's adopted home. Chilean writer Luis Sepúlveda was quoted by the Mexican newspaper Reforma as saying that he was "the most important writer in Spanish of the 20th century", central to the Latin American literary boom that "revolutionised everything: the imagination, the way of telling a story, and the literary universe".

The Colombian singer Shakira wrote: "We will remember your life, dear Gabo, like a unique and unrepeatable gift, and the most original of stories."

Born in a small town near the northern coast ofColombia on 6 March 1927, García Márquez was raised by his grandparents for the first nine years of his life and began working as a journalist while studying law in Bogotá.

A series of articles relating the ordeal of a Colombian sailor sparked controversy and saw him travel to Europe as a foreign correspondent in 1955, the year in which he published his first work of fiction, the short novel Leaf Storm. Short stories and novellas with the realism of Hemingway as their inspiration followed, but after the publication of The Evil Hour in 1962 García Márquez found himself at an impasse.

Speaking to the Paris Review in 1981 he explained how he decided his writings about his childhood were "more political" than the "journalistic literature" he had been engaged with. He wanted to return to his childhood and the imaginary village of Macondo he had created in Leaf Storm, but there was "always something missing". After five years he hit upon the "right tone", a style "based on the way my grandmother used to tell her stories".

"She told things that sounded supernatural and fantastic, but she told them with complete naturalness," García Márquez said. "When I finally discovered the tone I had to use, I sat down for 18 months and worked every day."

García Márquez with a copy of his book One Hundred Years of Solitude in 1975. Isabel Steva Hernandez (Colita)/Corbis

Right from the elliptical opening sentence – which finds Colonel Aureliano Buendía facing a firing squad and remembering the "distant afternoon" many years before when "his father took him to discover ice" – One Hundred Years of Solitude weaves together the misfortunes of a family over seven generations. García Márquez tells the story of a doomed city of mirrors founded in the depths of the Colombian jungle with the "brick face" his grandmother used to tell ghost stories, folk tales and supernatural legends.

The novel was an instant bestseller, with the first edition of 8,000 copies selling out within a week of its publication in 1967. Hailed by the Chilean poet Pablo Neruda as "perhaps the greatest revelation in the Spanish language since Don Quixote of Cervantes", One Hundred Years of Solitude went on to win literary prizes in Italy, France, Venezuela and beyond, appearing in more than 30 languages and selling more than 30m copies around the world. García Márquez forged friendships with writers such as Carlos Fuentes, Julio Cortazar and Vargas Llosa – a friendship that ended in the 1970s after Vargas Llosa floored the Colombian with a punch outside a Mexico City cinema.

The Autumn of the Patriarch, which the author called a "poem on the solitude of power", followed in 1975. García Márquez assembled this story of the tyrannical leader of an unnamed Caribbean nation from a collage of dictators such as Franco, Perón, and Pinilla, and continued to draw inspiration from Latin America's history of conflict with a novella inspired by the murder of a wealthy Colombian, The Chronicle of a Death Foretold, published in 1981.

A year later he was awarded the Nobel prize for literature, the Swedish Academy hailing fiction "in which the fantastic and the realistic are combined in a richly composed world of imagination, reflecting a continent's life and conflicts". Speaking at the ceremony in Stockholm, he painted a picture of a continent filled with "immeasurable violence and pain" that "nourishes a source of insatiable creativity, full of sorrow and beauty".

"Poets and beggars, musicians and prophets, warriors and scoundrels, all creatures of that unbridled reality, we have had to ask but little of imagination," he said, "for our crucial problem has been a lack of conventional means to render our lives believable."

An undated photo of García Márquez. Photograph: AP

The lives García Márquez next made "believable" were those of his parents, whose extended courtship was rendered into Love in the Time of Cholera, first published in 1985. The novel tells how a secret relationship between Florentino Arizo and Fermina Daza is thwarted by Fermina's marriage to a doctor trying to eradicate cholera, only to be rekindled more than 60 years later.

A 1989 account of Simón Bolívar's final months, The General in his Labyrinth, blended fact and fiction, but García Márquez never left journalism behind, arguing that it kept him "in contact with the real world". Clandestine in Chile, published in 1986, was an account of the Chilean filmmaker Miguel Littín, who returned to his homeland in secret to make a documentary about life under General Augusto Pinochet. News of a Kidnapping explored how prominent figures in Colombian society were snatched and imprisoned by Pablo Escobar's Medellín drug cartel.

He continued to write, publishing a memoir of his early life in 2002 and a novella that chronicles an old man's passion for an adolescent girl in 2004, but never regained the heights of his earlier masterpieces. His brother Jaime García Márquez revealed in 2012 that the writer was suffering from dementia after undergoing chemotherapy for lymphatic cancer first diagnosed in 1999.

Asked in 1981 about his ambitions as a writer he suggested that it would be a "catastrophe" to be awarded the Nobel prize, arguing that writers struggle with fame, which "invades your private life" and "tends to isolate you from the real world".

"I don't really like to say this because it never sounds sincere," he continued, "but I would really have liked for my books to have been published after my death, so I wouldn't have to go through all this business of fame and being a great writer."

• Obituary: catalyst of boom in Latin American literature