Former South African President Nelson Mandela (R) kisses Israeli Foreign Minister Shimon Peres in 2002 after a meeting at Mandela's office in Johannesburg.

By Robert Windrem, NBC News

Among the world leaders who have showered South Africa with condolences since the death of Nelson Mandela, Israel’s Shimon Peres stood out as a peer. Like Mandela, he won a Nobel Peace prize. Like Mandela, he stayed on the world stage long past retirement age. Mandela died at 95. At 90, Peres is still serving as Israel’s president.

"The world has lost a great leader who changed the face of history,” said Peres on behalf of the Israeli nation. “Nelson Mandela was a human rights fighter who made his mark on the war against discrimination and racism."

But in the 1970s, while Mandela was languishing in a damp prison cell on Robben Island, Peres was making deals with South Africa's apartheid regime, according to interviews and documents gathered by NBC News, a recent documentary and a book based on Israeli and South African government documents. With the help of an Israeli operative now famed as the Hollywood mogul behind “Pretty Woman” and “Fight Club,” Peres traded missiles for money and the uranium needed for atomic bombs.

At the center of the relationship was a "Joint Secretariate for Political and Psychological Warfare" set up in 1975 to handle various matters, not the least of which was "propaganda and psychological warfare." It was an outgrowth of a $100 million South African propaganda campaign to fix the country’s tarnished image. Leading the effort was the late Eschel Rhoodie, a brash apparatchik who had convinced the regime’s leaders they needed to sell apartheid to the western media.

Under terms of the agreement, championed by Peres, then Defense Minister, and Yitzhak Rabin, the Prime Minister, Israel would help South Africa burnish its international reputation. South Africa would supply the money, with each country appointing a secretary to look after its interests.

As the relationship grew, the two sides began to cooperate on military, even nuclear development. Peres, the architect of Israel’s nuclear program, had procured the country’s first nuclear reactor in the 1950s, and built a clandestine agency called the Science Liaison Bureau that collected nuclear technology.

In a February 1993 interview, Rhoodie told NBC News he was the chief representative on the South African side. "Arnon Milchan was the chief representative on the Israeli side,” said Rhoodie. “We paid him about 30,000 rand [$40,000] a year." Milchan is now a Hollywood billionaire who has produced more than 120 movies, including “Mr. and Mrs. Smith” and “L.A. Confidential.” When he was in his 20s, however, Peres recruited him for the Science Liaison Bureau. Peres designated Milchan to represent Israel in South Africa.

The cooperation began in 1974 when Rhoodie flew to Tel Aviv. A year later, said Rhoodie, the countries signed an extensive agreement at the Baur au Lac Hotel in Zurich, Switzerland. The agreement even envisioned a visit to Israel by South African prime minister Johannes Vorster -- a World War II Nazi sympathizer.

Peres was so pleased with the growing bond that he wrote Rhoodie a letter of thanks, dated Nov. 22, 1974, following a secret meeting in Pretoria, the South African capital.

"It is to a very large extent due to your perspicacity, foresight and political imagination that a vitally important cooperation between our two countries has been initiated," said the letter, which asserted that the relationship rested on "unshakable foundations of our common hatred of injustice and our refusal to submit to it."

Peres later introduced Rhoodie to Milchan in Tel Aviv, according to Rhoodie. Although the two later had a falling out, they worked closely together.

But the big moves were made at the top. In his 2010 book, "The Unspoken Alliance," Sasha Polakow-Suransky describes the broad agenda of the two countries' secret arrangement, as laid out in South African government documents he obtained under the country's freedom of information laws. Of one meeting between the two sides, in January 1975, Polakow-Suransky writes:

"The group, chaired by [South African] military intelligence chief Hein du Toit, addressed Soviet and Chinese influence in Africa, weapons sales to African and Arab states, Soviet and Arab naval movements in the Indian Ocean, and most importantly, 'Palestinian terrorist organizations and [their] cooperation with terrorist organizations that operate in southern Africa.'"

As time wore on, the discussions moved from counter-terrorism and intelligence to strategic cooperation, even the provision of nuclear-tipped missiles. Polakow-Suransky writes of another meeting in June 1974 in Zurich between Peres, then Israel’s defense minister, and P.W. Botha, his South African counterpart,

"Now, the discussion turned to warheads. Minutes from the June meeting reveal that Botha expressed interest in the Jerichos (short range missiles) if they came with the 'correct payload,' and that "Minister Peres said the correct payload was available in three sizes.'"

Polakow-Suransky quotes another memo that makes it clear Botha was talking about nuclear warheads. The nuclear part of the deal was never consummated, writes Polakow-Suransky, now an editor at the New York Times.

But Israel certainly developed its own nuclear weapons, apparently with the help of South Africa. Rhoodie and another high-ranking South African official told NBC of an arrangement between the two countries in the late 1970s in which South Africa supplied 600 tons of uranium to Israel in return for 30 grams of tritium, used to detonate nuclear weapons. The uranium was codenamed "mutton," the tritium "tea leaves" and the overall exchange was called "Project Mint."

As part of his procurement role, Milchan has long admitted he bankrolled a California firm that exported nuclear triggers and other missile components to Israel. The U.S. also had suspicions that the Peres-inspired Joint Secretariate may have been used by Israel to provide triggers (“krytrons”) and other nuclear technology to South Africa in the early 1980s. “We considered the possibility that krytrons had gone to South Africa. We had no hard evidence," said a senior U.S. Customs official at the time.

Whether or not Israel supplied triggers to South Africa, it did provide the apartheid regime with Jericho missiles, or at least Jericho technology, by 1989. On July 5 of that year, U.S. spy satellites tracked a missile launch from the Overberg test range east of Cape Town. Computers compared the shape, temperature and other elements of the missile's heat plume with those of other rockets. The computers said the new South African missile's exhaust trail bore a striking resemblance to that of the Jericho-I, a short-range missile that Israel had begun developing in 1962. Another satellite took images of the South African missile’s launcher. It was identical to the one Israel used to launch the Jericho I.

The launch dramatically helped the apartheid regime, according to a U.S. Defense intelligence Agency assessment. Once the missiles were operational, the report predicted "Pretoria will have acquired another means with which to intimidate its regional neighbors." The same assessment pointed to "substantial Israeli assistance." The U.S. also found that Israel had used the Overberg site to test its more advanced Jericho II missile six times between May 1987 and January 1990.

It was long after the missile launches that South African President F.W. de Klerk brokered the end of the apartheid regime with Mandela. By 1994, Mandela was president of South Africa, and Israel's relationship with the new government deteriorated. The ANC's intelligence wing had kept close tabs on the ties between the Israelis and the white minority government. The ANC’s expert on the relationship became the new head of South African intelligence. By August 1994, the last Israeli military families had left South Africa.

A new Israeli ambassador to South Africa was named. Elazar Granot, an honorary president of the Socialist International, had protested apartheid and Israel's relationship with the old government. But in a 2004 conversation with Polakow-Suransky, he said that one good thing had come out of the relationship.

In the mid 1990s, during meetings in Norway, Israel negotiated initial agreements with the Palestinians that allowed for limited Palestinian autonomy. "Maybe Rabin and Peres were able to go to the Oslo agreements because Israel was strong enough to defend itself," said Granot. "Most of the work that was done --I'm talking about the new kinds of weapons -- was done in South Africa."

Peres, through the office of the president, issued a denial of the assertions about nuclear sharing when Polakow-Suransky's book was published in 2010.

“There exists no basis in reality for the claims [that] Israel negotiated with South Africa the exchange of nuclear weapons,” said the statement.

Milchan, in a documentary that aired on Israeli TV two weeks ago, defended both his procurement of weapons components and his work for South Africa, which he said he did after being recruited by Peres.

"I did it for my country and I'm proud of it," he said.

But Milchan has said he was appalled by what he saw in apartheid-era South Africa, and notes he is the producer of "12 Years a Slave."

Robert Windrem produced several stories on “Nightly News” and “Today” between in the late 1980s and early 1990s about the relationship between South Africa and Israel, and wrote about it in his 1994 book, “Critical Mass: The Dangerous Race for Superweapons in a Fragmenting World.” He was also a consultant for an episode of the Israeli TV documentary series “Fact” about Milchan’s clandestine activities that aired in November.