Yitzhak Hofi, an Israeli military general and former Mossad chief, who played a key role in the country’s daring 1976 commando rescue raid in Uganda, died Monday, Sept. 15, 2014. (Uncredited/AP)

Yitzhak Hofi, an Israeli army general who as his country’s top spymaster helped coordinate the daring commando raid to free Israeli hostages in Entebbe, Uganda, and took steps toward normalizing relations with Egypt before the Camp David peace talks, died Sept. 15 in Ramat Gan, Israel. He was 87.

The government announced the death but did not cite a cause.

Mr. Hofi was eulogized by Prime Minister Benjamin Netanyahu for having worked “all his life on behalf of the security of the state of Israel.” He was widely regarded as one of the most effective leaders of the Mossad, the espionage agency he led from 1974 to 1982 that was known for its derring-do in counterterrorism, covert operations and helping Jewish immigration to Israel.

As part of Israel’s founding generation, Mr. Hofi served in the Palmach, the underground paramilitary force of pre-independence Israel. After Israel became a nation in 1948, he was among the Palmach fighters who helped build the new country’s Israeli Defense Forces.

Over the next quarter-century, Mr. Hofi rose through the ranks of the IDF and distinguished himself as commander of the northern front against Syria during the 1973 Arab-Israeli War. The next year, Prime Minister Yitzhak Rabin appointed Mr. Hofi head of the Mossad, even though he had no background in intelligence work.

He presided over a momentous period in Israel’s and the agency’s history. Under his direction, the Mossad simultaneously worked to kill Nazis and terrorists and to look for openings for peace with Arab countries.

The 1976 rescue of hijacked airline passengers at the Entebbe airport in Uganda was the source of jubilation and pride among Israelis and enduring personal pain for Benjamin Netanyahu. Yonatan Netanyahu, the unit commander and the future prime minister’s older brother, was killed in the raid.

The Air France plane, en route from Athens to Paris, was hijacked by Palestinian and German radicals. In Uganda, where the government of Idi Amin seemed to welcome the international drama, the hijackers divided the more than 250 passengers and crew into two groups. Virtually everyone was freed except for 106 Israelis and Jews and the non-Jewish captain who were held as hostages, a separation that haunted a nation founded after the genocide of the Holocaust.

According to accounts in the Israeli press, Mr. Hofi oversaw the preliminary work that made the rescue mission possible. It required a pilot willing to circle the airport and wheedle facts from controllers while surreptitiously taking photos to be used in plotting the Israeli assault. It also involved making contacts within Kenyan intelligence circles so Israeli commandos could refuel in Nairobi on the return flight.

When the commandos swooped in to storm the terminal, three hostages, the hijackers and 45 Ugandan soldiers were killed, but 103 hostages made it home safely. The episode was the subject of many books and films.

Mr. Hofi’s most enduring legacy is less well known outside of Israel. He laid the groundwork for Israel’s peace with Egypt, a peace that while sometimes lacking warmth endures to this day.

In 1977, Mr. Hofi met secretly more than 20 times in Morocco with Egyptian officials, paving the way for what eventually became Egyptian President Anwar Sadat’s historic visit to Jerusalem. Two years later, in 1979, Sadat and Israeli Prime Minister Menachem Begin signed a peace treaty at Camp David.

Mr. Hofi privately argued against Israel’s 1981 strike again Iraq’s Osirak nuclear reactor near Baghdad. But during his tenure, according to authors Dan Raviv and Yossi Melman, the Mossad waged a covert campaign to sabotage Iraq’s nuclear ambitions by killing scientists and damaging equipment before it reached Iraq.

While Mr. Hofi was director, the Mossad assassinated a number of Palestinian terrorists. Among them was Ali Salameh, the chief of operations for Black September, the group responsible for the massacre of Israeli athletes at the 1972 Olympics in Munich.

In a 2012 documentary aired on Israel’s Channel 1, Mr. Hofi also talked about how Begin authorized him to resume the hunt for escaped Nazis.

He said the Mossad was behind a 1980 attempt to kill Alois Brunner, a concentration camp commander who also served as a key lieutenant to Nazi official Adolf Eichmann. They sent him a letter bomb to his home in Damascus. It cost Brunner an eye and several fingers, but did not kill him.

Yitzhak Hofi was born Jan. 25, 1927, in Tel Aviv in what was then the British mandate in Palestine.

While in the IDF, he was known for his prescience and willingness to speak his mind. As head of Israel’s Northern Command at the Syrian border in 1973, he grew alarmed at a Syrian military build-up in the Golan. He had less than 80 tanks in his command, while about 800 Syrian tanks massed at the border.

He expressed his concern at a general staff meeting, one of the few senior military officials who warned of what would become a surprise attack on Yom Kippur. He got a couple of dozen more tanks for his efforts. It was not enough to stop the Syrians from advancing in the war’s initial days, though under Mr. Hofi’s command, the Syrians were halted and pushed back.

After he left the Mossad — where his identity was a state secret — Mr. Hofi resumed a more public life and served eight years as chief executive the Israel Electric Corp.

“When I became head of the Mossad, people thought I had emigrated,” he told Israeli Radio years later when he spoke out unsuccessfully in opposition to a policy change making the Mossad head’s name public. “I traveled to all sorts of places to approve various operations. It is very important the Mossad chief not be linked to a place where something later happens.”