Updated at 1:30 p.m. ET.

Winnie Madikizela-Mandela, wife of the late South African leader Nelson Mandela, and a leading anti-apartheid figure in her own right during the country's most turbulent years, has died at age 81.

The Mandela family said in a statement that she died Monday in Johannesburg "after a long illness, for which she had been in and out of hospital since the start of the year."

South African President Cyril Ramaphosa called her "an abiding symbol of the desire of our people to be free. In the midst of repression, she was a voice of defiance and resistance."

During the 27 years Nelson Mandela spent in prison, Madikizela-Mandela was one of the most outspoken critics of South Africa's white government.

She was most visible in the 1980s, renowned for revving up crowds of young, black activists with her fierce speeches denouncing the country's comprehensive system of racial segregation. At the time, many blacks referred to her as "Mother of the Nation."

As she raised the couple's two young daughters, she was frequently harassed by the government, which at various times put her in prison, placed her under house arrest, banished her to a remote town and kept her under constant surveillance. She and her daughters were rarely allowed to visit Nelson Mandela in prison.

In a 2004 interview on The Tavis Smiley Show, Madikizela-Mandela said:

"I probably would have never turned out to be what I am today had it not been the viciousness of apartheid. No human being with any honor and pride could have stood by and be a spectator and witnessed the horrors of apartheid without protesting. You had to fight for your dignity."

Yet she also became a polarizing figure mired in repeated scandals that included criminal convictions.

The most serious was in 1989, when her team of hand-picked bodyguards abducted and killed one of its own members, 14-year-old James "Stompie" Seipei, accusing him of being a government informant.

Madikizela-Mandela denied involvement. But her chief bodyguard was convicted of the killing. She was convicted of his kidnapping and sentenced to prison, but the sentence was later reduced to a fine.

Nelson Mandela was released in 1990 and walked out of prison with Madikizela-Mandela at his side, both raising clenched fists as black South Africans celebrated nationwide.

Mandela then led the negotiations with the white government that would lead to the end of apartheid — and his election as president — four years later.

Meanwhile, Madikizela-Mandela continued to play a leading role as an activist, frequently appearing at rallies during this tumultuous period, when thousands of South Africans, almost all of them blacks, where killed in political violence.

But the couple's relationship was clearly strained and they separated in 1992. They divorced in 1996, while Mandela was serving as the country's first black president.

Nelson Mandela met Madikizela-Mandela in 1957 at a bus stop in Soweto, the huge black township just outside Soweto. He was almost 40, already a leading figure in the African National Congress, and she was 22, a young social worker at a hospital.

He said he was immediately struck by her beauty. He then divorced his first wife and married Madikizela-Mandela the following year. They soon had two girls, but Mandela was often operating underground and seldom at home. He was arrested and sentenced to life in prison in 1964 for his role in the ANC's sabotage campaign against the white government.

Madikizela-Mandela was still in her 20s at the time, but grew to become a spokeswoman for her husband and then a leading activist. She welcomed the media attention and could be a captivating speaker at rallies.

While Nelson Mandela was moderate and called for inclusiveness, she was confrontational and defiant, angering not only the white government during the apartheid days, but the ANC in her later years.

Madikizela-Mandela held a number of prominent positions in the post-apartheid era, serving as a member of parliament and head of the ANC's Women's League. But her reputation declined sharply due to the repeated controversies.

In 1998, the country's Truth and Reconciliation Commission, headed by the Nobel Peace Prize laureate Rev. Desmond Tutu, found Madikizela-Mandela "politically and morally accountable for the gross violations of human rights" during the 1980s due to the actions of her bodyguards, who were formally known as the Mandela United Football Club.

She was convicted of fraud in 2003 and continued to make provocative statements. In 2010, she was quoted in an interview as saying that her former husband had "let blacks down."

Copyright 2018 NPR. To see more, visit http://www.npr.org/.