JOHANNESBURG -- Legendary South African jazz musician Hugh Masekela has died at the age of 78 after a decade-long fight with cancer, according to a statement from his family on Tuesday.

Often called the "Father of South African jazz," Masekela died in Johannesburg after what his family said was a "protracted and courageous battle with prostate cancer."

Trumpeter, singer and composer Masekela, affectionately known locally as "Bra Hugh," started playing the horn at 14 and quickly became an integral part of the 1950s jazz scene in Johannesburg as a member of the Jazz Epistles.

Get Breaking News Delivered to Your Inbox

In the 1960s he went into exile in the United Kingdom and the United States, where he collaborated with American jazz legend Harry Belafonte and used his music to spread awareness about the oppressive system of white-minority rule in South Africa. He also scored an international number one hit in 1968 with "Grazing In The Grass."

He collaborated with many musicians including Paul Simon and Herb Alpert. He was married to South African singer and activist Miriam Makeba for two years.

South African trumpeter, composer, and singer Hugh Masekela entertain guests during the CAF African Footballer of the Year Award in Lagos on January 8, 2015. Getty

Many of his compositions were about the struggle for majority rule and full democratic rights in South Africa. Masekela's catchy composition "Bring Him Back Home" calling for Nelson Mandela to be released from prison became an international anthem for the anti-apartheid movement.

"Hugh's global and activist contribution to and participation in the areas of music, theatre, and the arts in general is contained in the minds and memory of millions across six continents," the family statement read.

In October last year, Masekela issued a statement that he had been fighting prostate cancer since 2008 and would have to cancel his professional commitments to focus on his health. He said he started treatment after doctors found a "small 'speck'" on his bladder, and had surgery in March 2016 after the cancer spread.

Masekela also said he felt an "imbalance" and had an eye problem after a fall in April in Morocco in which he sprained his shoulder. He said another tumor was then discovered and he had surgery.

"I'm in a good space, as I battle this stealthy disease, and I urge all men to have regular tests to check your own condition," his statement said, asking the media for privacy.

Condolences from fans poured out Tuesday on social media paying tribute to the influential musician's career.

"A baobob tree has fallen," Nathi Mthethwa, South Africa's minister for arts and culture, wrote on Twitter. "The nation has lost a one of a kind musician . We can safely say Bra Hugh was one of the great architects of Afro-Jazz and he uplifted the soul of our nation through his timeless music."

South African President Jacob Zuma expressed his condolences, saying Masekela "kept the torch of freedom alive globally, fighting apartheid through his music and mobilizing international support for the struggle for liberation and raising awareness of the evils of apartheid ... His contribution to the struggle for liberation will never be forgotten."

Masekela inspired generations of musicians in jazz and beyond and collaborated in recent years with South African house music DJ Black Coffee and others. "I have no words," the DJ said Tuesday on Twitter.