Ken Taylor, the Canadian diplomat who sheltered six Americans in Tehran during the Iranian hostage crisis and clandestinely aided their flight from the country, died Thursday in New York City. He was 81.

“As Canada’s ambassador to Iran during the Iranian Revolution, Taylor valiantly risked his own life by shielding a group of American diplomats from capture,” Canadian Prime Minister Stephen Harper said in a statement. “Ken Taylor represented the very best that Canada’s foreign service has to offer.”

Except for those three months in winter of 1979, Taylor’s public career evinced little of the drama that would characterize one of the most famous moments in Canadian diplomatic history. He worked in Canada’s industry ministry and specialized in foreign trade commissions before Pierre Trudeau elevated him to the diplomatic corps. An initial New York Times description of Taylor after the escape from Iran perfunctorily described him as a diplomat “whose career has been spent primarily in furthering his country’s commercial interests.”

That changed on November 8, 1979, when John Sheardown, a Canadian consular official, telephoned Taylor and informed him that five Americans had escaped from the U.S. embassy in Tehran after it was stormed four days earlier, and that they were in hiding in Sheardown’s house. (Sheardown died in 2013.) Taylor moved two of them to his own residence, where they were joined by another American who had found temporary refuge among Swedish diplomats.

In the tumult that followed the Iranian Revolution, the U.S. and Canadian governments feared what would happen if the six Americans and their Canadian protecters were discovered. Taylor and his remaining staff, in coordination with Canadian Prime Minister Joe Clark and the U.S. State Department, orchestrated the six Americans’ escape from Iran. Every possible avenue of escape posed its own risks, as Taylor explained to The New York Times in 1981.

At first, Canadian officials in Teheran considered driving the four men and two women to Tabriz, in the northeast, and over the border to Turkey. But Mr. Taylor said that Tabriz was “up in arms with local revolts and once they left our residences we would lose control.”

Next, a dash for a Persian Gulf port and a friendly tanker was considered. But Teheran was lawless, he said, “to say nothing of the countryside.” Moreover, this move would have meant traveling through Khuzistan, the Arab-populated province that was in turmoil and later became the focus of the war with Iraq. “We couldn't say goodbye to our house guests with any degree of confidence on that route,” Mr. Taylor said.

“So we decided to confront the Iranians head on,” he added, and fly out the six Americans directly from the Teheran airport.

Taylor gave Canadian passports to the Americans so they could pass through customs, while the CIA forged exit visas and sent an agent, Tony Mendez, to aid their flight. As the Americans left, Taylor also evacuated the few remaining Canadian personnel and closed the embassy on January 28. The six Americans’ safety was originally kept secret by both governments for fear of retribution toward the hostages.

But the next day, a Montreal newspaper reported on the “Canadian Caper,” as the six Americans’ escape would subsequently be known, for the first time to the world. Taylor and his staff became national heroes in two countries overnight. Among many other accolades, Taylor received the Order of Canada, his country’s highest honor, and a Congressional Gold Medal from the U.S. Congress. He became Canada’s consul-general in New York City and retired from the diplomatic service in 1984.

In 1988, the CIA’s involvement in the escape became public knowledge for the first time. The 2012 film Argo, directed by Ben Affleck, played up the U.S. spy agency’s role in the escape at the Canadians’ expense, omitting Sheardown’s role in the caper and falsely implying that the Canadian government was willing to leave the six Americans behind after closing the embassy.

Canadian critics and newspapers strongly criticized the film’s accuracy after its debut at the 2012 Toronto International Film Festival. In response, Affleck apologized and changed a note in the closing credits that had undercut Taylor’s role. “The movie’s fun, it’s thrilling, it’s pertinent, it’s timely,” Taylor told the Toronto Star in 2012. “But look, Canada was not merely standing around watching events take place. The CIA was a junior partner."

His frustration is understandable. The caper evokes a golden age in Canadian foreign policy, when the country played an outsized role in world affairs under energetic prime ministers like Trudeau and Lester Pearson. Taylor, for his part, continued to follow Iranian politics and literature with interest after his dramatic departure. After the U.S. and five other world powers reached an accord with Iran over the country’s nuclear program this year, Taylor praised the deal and criticized the Canadian government for not doing more to thaw relations with Iran.

“I’m very much in favor of what President Obama calls engagement. Diplomacy for me is, one way or another, a method to influence an adversary,” he told a Canadian news outlet in April. “That doesn’t seem to be the case in Ottawa at the moment. Diplomacy, in respect to at least coming to a neutral relationship with Iran, doesn’t seem to be in the vocabulary.”