FW de Klerk, who shared the Nobel Peace Prize with Nelson Mandela and as South Africa's last apartheid president oversaw the end of the country's white minority rule, has died at the age of 85.

Mr de Klerk, who had been diagnosed with cancer, died at his home in the Fresnaye area of Cape Town, a spokesman for the FW de Klerk Foundation confirmed on Thursday.

Mr de Klerk was a controversial figure in South Africa where many blamed him for violence against Black South Africans and anti-apartheid activists during his time in power, while some white people saw his efforts to end apartheid as a betrayal.

It was Mr de Klerk who in a speech to South Africa's parliament on February 2 1990, announced that Mr Mandela would be released from prison after 27 years.

The announcement electrified a country that for decades had been scorned and sanctioned by much of the world for its brutal system of racial discrimination known as apartheid.

With South Africa's isolation deepening and its once-solid economy deteriorating, Mr de Klerk - who had been elected president five months earlier - also announced in the same speech the lifting of the ban on the African National Congress and other anti-apartheid political groups.

Amid gasps, several members of parliament left the chamber as he spoke.

Nine days later, Mr Mandela walked free.

Four years after that, Mr Mandela was elected as the country's first black president as black South Africans voted for the first time.

By then, Mr de Klerk and Mr Mandela had been awarded the Nobel Peace Prize in 1993 for their often tense co-operation in moving South Africa away from institutionalised racism and towards democracy.

Talking to reporters after his speech to parliament, Mr de Klerk said the country would be "a new South Africa". But Mr Mandela's release was just the beginning of intense political negotiations about the way forward, with power shifting, a new constitution written and ways of life upended.

"There is an element of uncertainty, obviously, with regard to everything which lies in the future," Mr de Klerk told reporters on February 10 1990, after announcing that Mr Mandela would be released the following day.

The toll of the transition was high. As Mr de Klerk said in his Nobel lecture in December 1993, more than 3,000 people died in political violence in South Africa that year alone. As he reminded his Nobel audience, he and fellow laureate Mr Mandela remained political opponents, with strong disagreements but that they would move forward "because there is no other road to peace and prosperity for the people of our country".

After Mr Mandela became president, Mr de Klerk served as deputy president until 1996, when his party withdrew from the Cabinet.

In making history, Mr de Klerk acknowledged that Mr Mandela's release was the culmination of what his predecessor, former president PW Botha, had begun by meeting secretly with Mr Mandela shortly before leaving office.

In the late 1980s, as protests inside and outside the country continued, the ruling party had begun making some reforms, getting rid of some apartheid laws.

Mr de Klerk also met secretly with Mr Mandela before his release.

He later said of their first meeting that Mr Mandela was taller than expected, and he was impressed by his posture and dignity.

Mr De Klerk would say he knew he could "do business with this man". But it was not easy and the pair argued bitterly. Mr Mandela accused Mr de Klerk of allowing the killings of black South Africans during the political transition. Mr de Klerk said Mr Mandela could be extremely stubborn and unreasonable.

Later in life, after South Africa's wrenching political transition, Mr de Klerk said there was no longer any animosity between him and Mr Mandela and that they were friends, having visited each other's homes.

Mr de Klerk did not seem to fit easily into the role of a Nobel laureate. He remained a target of anger for some white South Africans who saw his actions as a betrayal. Although he publicly apologised for the pain and humiliation that apartheid caused, he was never celebrated and embraced as an icon, as Mr Mandela was.

"Sometimes, Mr de Klerk does not get the credit that he deserves," Nobel laureate and former archbishop Desmond Tutu said in an interview in 2012.

Despite his role in South Africa's transformation, Mr de Klerk would continue to defend what his National Party decades ago had declared as the goal of apartheid, the separate development of white and black South Africans.

But in practice, apartheid forced millions of the country's black majority into nominally independent "homelands" where poverty was widespread, while the white minority held most of South Africa's land. Apartheid starved the black South African education system of resources, criminalised inter-racial relations, created black slums on the edges of white cities and tore families apart.

Mr de Klerk late in life would acknowledge that "separate but equal failed".

Mr de Klerk was born in Johannesburg in 1936. He earned a law degree and practiced law before turning to politics and being elected to parliament. In 1978, he was appointed to the first of a series of ministerial posts, including internal affairs. In the late 1970s and 1980s, South Africa faced violent unrest as the government tried modest reforms to cultivate a black South African middle-class and allow limited political power to the country's other marginalised groups.

The moves only increased bitterness over apartheid, while international pressure for more fundamental changes increased. In February 1989, Mr de Klerk was elected the National Party leader and in his first speech called for "a South Africa free of domination or oppression in whatever form". He was elected president in September of that year.