Winnie Madikizela-Mandela, prominent anti-apartheid activist and the ex-wife of Nelson Mandela, died in a hospital on Monday after a long illness at the age of 81.
"She succumbed peacefully in the early hours of Monday afternoon surrounded by her family and loved ones," Ms Madikizela-Mandela's family said in a statement.
Ms Madikizela-Mandela was married to Mr Mandela from 1958 to 1996.
Mr Mandela, who died in 2013, was imprisoned throughout most of their marriage and Ms Madikizela-Mandela's own activism against white minority rule led to her being imprisoned for months and placed under house arrest for years.
"She kept the memory of her imprisoned husband Nelson Mandela alive during his years on Robben Island and helped give the struggle for justice in South Africa one of its most recognisable faces," the family said.
However, Ms Madikizela-Mandela's political activism was marred by her conviction in 1991 for kidnapping and assault, for which she was fined.
She faced these allegations again during the 1997 hearings before the Truth and Reconciliation Commission, a panel that investigated apartheid-era crimes.
As a parliamentarian after South Africa's first all-race elections, she was convicted of fraud.
Still, Ms Madikizela-Mandela remained a venerated figure in the ruling African National Congress, which has led South Africa since the end of apartheid in 1994.
She was a veteran of the anti-apartheid struggle who continued to tell the party "exactly what is wrong and what is right at any time", said senior ANC leader Gwede Mantashe.
The ANC, which was the main movement against apartheid, had lost popularity in recent years in part because of scandals linked to former president Jacob Zuma, who resigned in February.
Nobel laureate and former archbishop Desmond Tutu, a periodic critic of the ruling party over the years, described Ms Madikizela-Mandela as "a defining symbol" of the fight against apartheid.
"She refused to be bowed by the imprisonment of her husband, the perpetual harassment of her family by security forces, detentions, bannings and banishment," Mr Tutu said. "Her courageous defiance was deeply inspirational to me, and to generations of activists."
Ms Madikizela-Mandela had been in and out of hospital since the start of the year, according to her family.
She had back surgery a year ago.
The family said it will release details of her memorial and funeral services when they are finalised.
Ms Madikizela-Mandela always was aware of the danger of being submerged in the shadow of her husband's all-encompassing personality.
Even before they were separated by Nelson Mandela's long stay in prison, she had become politicised, being jailed for two weeks while pregnant for participating in a women's protest against apartheid restrictions on blacks.
The apartheid police later harassed her, sometimes dragging her from bed at night without giving her a chance to make arrangements for her daughters.
Ms Madikizela-Mandela complained bitterly on a North American tour after she was forced to give evidence to South Africa's Truth and Reconciliation Commission in 1997 that the commission never asked her about the treatment she suffered over 18 months in solitary confinement.
The Mandela marriage that survived decades of prison bars dissolved with a formal separation in 1992, two years after Nelson Mandela was released.
The couple divorced in 1996, two years after Mr Mandela became president in South Africa's first all-race elections, with Mr Mandela accusing his wife of infidelity.
As the mother of two of Mr Mandela's children, Ms Madikizela-Mandela and her ex-husband appeared to rebuild a friendship in his final years, before his 2013 death.