South African musician Hugh Masekela has died at the age of 78.

Often called the “Father of South African jazz”, he died in Johannesburg surrounded by his family after what they said was a “protracted and courageous battle with prostate cancer.”

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

He later went into exile in the UK and the US in the 1960s, where he collaborated with American jazz star Harry Belafonte, and used his music to spread awareness about the oppressive system of white-minority rule in South Africa.

He scored an international number one hit in 1968 with Grazing In The Grass, and collaborated with many musicians including Paul Simon and Herb Alpert.

Hugh Masekela diesHugh Masekela began his musical career at the age of 14 (Leon Neal/PA)

He was married to South African singer and activist Miriam Makeba for two years.

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.

A statement from his family said: “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.”

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 tumour 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,” the statement said, asking the media for privacy.

Condolences from fans poured out on social media on Tuesday, 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 “was one of the pioneers of jazz music in South Africa whose talent was recognised and honoured internationally over many years

“He kept the torch of freedom alive globally, fighting apartheid through his music and mobilising 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.”