TORONTO — Ken Taylor, Canada’s ambassador to Iran who sheltered Americans at his residence during the 1979 hostage crisis, has died. He was 81.

Taylor’s wife, Pat, said he died Thursday after a two-month battle with colon cancer.

Taylor kept the Americans hidden at his residence and at the home of his deputy, John Sheardown, in Tehran for three months. Taylor facilitated their escape by arranging plane tickets and persuading the Ottawa government to issue fake passports.

He was heralded as a hero in both the U.S. and Canada.

Some of Taylor’s exploits in Iran in 1979 later became the subject of the 2012 Hollywood film, “Argo.” But Taylor and others, including former-U.S. President Jimmy Carter, felt the film downplayed his role and that of Canada in the operation.

Taylor’s wife said he was diagnosed with cancer in August and that friends visited him at New York Presbyterian hospital where he was being treated.

She said Taylor, born in 1934 in Calgary, has a legacy of generosity.

“He did all sorts of things for everyone without any expectation of something coming back,” she said. “It’s why that incident in Iran happened. There was no second thought about it. He just went ahead and did it. His legacy is that giving is what is important, not receiving. With all his friends that’s what he did.”

The six U.S. diplomats had managed to slip away when their embassy was overrun in 1979. They spent five days on the move, then took refuge at the Canadian Embassy for the next three months.

The CIA consulted with Canadian officials on how to organize a rescue, and Canada gave permission for the diplomats to be issued fake Canadian passports.

Tributes poured in for Taylor.

“Ambassador Taylor’s actions during the Iran hostage crisis were unquestionably heroic,” said Peter Boogaard, a White House National Security Council spokesman.

“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,” Prime Minister Stephen Harper said. “Ken Taylor represented the very best that Canada’s foreign service has to offer.”

Although Taylor’s actions were made famous again in the movie “Argo,” which won the 2013 Oscar for best picture, Taylor said it made Canada look like a meek observer to CIA heroics. The original postscript of the movie said that Taylor received 112 citations and awards for his work in freeing the hostages and suggested Taylor didn’t deserve them because the movie ends with the CIA deciding to let Canada have the credit for helping the Americans escape.

In 2013, Taylor’s story was told again at the Toronto International Film Festival, which debuted the documentary, “Our Man in Tehran.”

Taylor is also survived by his son, Douglas, and his wife Dana and two grandchildren.