JOHANNESBURG (AP) — Nelson Mandela’s ex-wife Winnie Madikizela-Mandela, an anti-apartheid activist in her own right whose reputation was sullied by scandal, has died. She was 81.

The woman many South Africans have described as the “Mother of the Nation” and a champion of the black majority, died “surrounded by her family and loved ones,” according to a statement released by Madikizela-Mandela’s family.

Madikizela-Mandela was the second of Mandela’s three wives, married to him from 1958 to 1996.

Mandela, who died in 2013, was imprisoned throughout most of their marriage, and Madikizela-Mandela’s own activism against white minority rule led to her being jailed 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 recognizable faces,” the family said.

However, 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, 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 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.

Zuma’s successor, President Cyril Ramaphosa, described Madikizela-Mandela in a televised tribute as a “champion of justice and equality” and a “voice for the voiceless.”

Nobel laureate and former archbishop Desmond Tutu, a periodic critic of the ruling party, noted her passing by describing 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,” Tutu said. “Her courageous defiance was deeply inspirational to me, and to generations of activists.”

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.

After hearing of her death, some people gathered Monday evening outside Madikizela-Mandela’s home in the Soweto area of Johannesburg to sing tributes. She had attended Easter services in Soweto over the long weekend.

The family said it will release details of her memorial and funeral services when they are finalized.

Madikizela-Mandela’s story was told in biographies and novels as well the Hollywood movie “Winnie,” starring Oscar-winning actress and singer Jennifer Hudson.

The young Winnie grew up in what is now Eastern Cape province and came to Johannesburg as the city’s first black female social worker. Her research into the high infant mortality rate in a black township, which she linked to poverty caused by racism, first sparked her interest in politics.

In 1957, she met Nelson Mandela, an up-and-coming lawyer and anti-apartheid activist 18 years her senior, and they married a year later.

The first five turbulent years of their marriage saw Mandela going underground to build the armed struggle against apartheid, and finally to prison in 1963, while his wife gave birth to two daughters.

Madikizela-Mandela always was aware of the danger of being 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 politicized, being jailed for two weeks while pregnant for participating in a women’s protest of 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.

In 1977, she was banished to a remote town, Brandfort, where neighbors were forbidden to speak to her. She was banned from meeting with more than one person at a time.

The woman who returned to Johannesburg in 1985 was much harder, more ruthless and bellicose, branded by the cruelty of apartheid and determined vengeance.

In her book “100 Years of Struggle: Mandela’s ANC,” Heidi Holland suggested that Madikizela-Mandela was “perhaps driven half-mad by security police harassment.” In an infamous 1986 speech she threatened “no more peaceful protests.”

Instead, she endorsed the “necklacing” method of killing suspected informers and police with fuel-doused tires put around the neck and set alight.

“Together hand-in-hand, with our boxes of matches and our necklaces, we shall liberate this country,” she said.

Madikizela-Mandela complained bitterly on a North American tour after she was forced to testify 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.

“Their personal relationship broke down,” said George Bizos, a human rights lawyer who represented Nelson Mandela at the 1960s Rivonia trial that led to his long imprisonment.

“Nelson Mandela called two other senior members of the ANC after his release and he actually said, ‘I love her, we have differences, I don’t want to discuss them, please respect her,'” Bizos said. “And he shed tears to say that we have decided to separate. He loved her to the end.”

The couple divorced in 1996, two years after Mandela became president in South Africa’s first all-race elections, with Mandela accusing his wife of infidelity.

As the mother of two of Mandela’s children, Madikizela-Mandela and her ex-husband appeared to rebuild a friendship in his final years.

After Mandela’s death, however, she became involved in disputes over his inheritance.