Gabriel Garcia Marquez, the Nobel Prize-winning Colombian author who used magical realism to tell epic stories of love, family and dictatorship in Latin America, has died at the age of 87.

Widely considered the most popular Spanish-language writer since Miguel de Cervantes in the 17th century, Garcia Marquez achieved literary celebrity that spawned comparisons to Mark Twain and Charles Dickens.

His flamboyant and melancholy works outsold everything published in Spanish except the Bible. The epic 1967 novel One Hundred Years of Solitude sold more than 50 million copies in more than 25 languages.

Nobel laureate: Gabriel Garcia Marquez. Photo: AP

Known affectionately as ‘‘Gabo’’, Garcia Marquez was a colourful character who befriended Cuban leader Fidel Castro, got punched by fellow Nobel laureate Mario Vargas Llosa and joked that he wrote so that his friends would love him.

Advertisement

‘‘One thousand years of solitude and sadness for the death of the greatest Colombian of all time,’’ Colombian President Juan Manuel Santos wrote on Twitter on Thursday.

He was one of the first journalists to visit post-revolutionary Cuba, arriving 18 days after Fidel Castro entered Havana on January 1, 1959.

Their lifelong camaraderie was why, for 30 years, he could travel to the US only on a restricted visa.

He married Mercedes Barcha in 1958, more than 12 years after he proposed to her, and they soon had two sons, Rodrigo and Gonzalo Garcia Barcha.

In the early 1960s, he wrote movie scripts and advertising copy to support himself. He also chipped away at the big novel, and during a period of about a year from 1965 to 1966, he banged out several pages a day of One Hundred Years of Solitude.

When it came to mail the finished manuscript to a publisher, Garcia Marquez discovered at the post office that he had only enough money to send half.

He and his wife returned home and pawned possessions so they could mail the rest.

By 1994, Garcia Marquez had ‘‘important relationships’’ with the presidents of the US, Mexico, Cuba, France and Spain, his biographer wrote.

He would eventually have seven homes in five countries.

In his native Colombia, he served as an intermediary between rebels and the government.

Garcia Marquez had a cancerous tumour removed from his lungs in 1992 and was treated for lymphoma seven years later.