William Ruckelshaus, who famously quit his job in the US justice department rather than carry out Richard Nixon’s order to fire the special prosecutor investigating the Watergate scandal, has died. He was 87.

Ruckelshaus was also the first administrator of the US Environmental Protection Agency, which confirmed his death.

A lifelong Republican, he was also acting director of the FBI. But his moment of fame came on 20 October 1973, when he was a deputy attorney general and joined attorney general Elliot Richardson in resigning rather than carry out Nixon’s unlawful order to fire special prosecutor Archibald Cox.

Solicitor general Robert Bork carried out the firing in what became known as the “Saturday Night Massacre”, prompting protests and outrage around the country. Impeachment proceedings began 10 days later.

“He was incorruptible,” longtime friend and Seattle philanthropist Martha Kongsgaard told the Associated Press, drawing a parallel to current impeachment proceedings against Donald Trump.

“It was very disappointing for him to see this happening again in our country, and maybe on a larger scale. Deep decency in the face of corruption is needed now more than ever.”

Ruckelshaus’ career spanned decades and US coasts, marked by stints at the EPA under Nixon and Ronald Reagan, a failed Senate bid in 1968 and top corporate positions at Weyerhaeuser and Browning-Ferris Industries.

He spent much of his life focused on air and water pollution and other environmental issues. As a young Indiana state attorney general, he sought court orders to prevent industries and cities polluting waters. In his later years, he was the Pacific north-west’s most high-profile advocate for cleaning up Puget Sound.

As EPA administrator from 1970 to 1973, he won praise for pushing automakers to tighten controls on air pollution. Shortly after taking over, he ordered the mayors of Detroit, Atlanta and Cleveland to stop polluting waters and took actions against US Steel and dozens of other polluters.

Reagan asked him back to the EPA in 1983 to help restore public trust after the prior administrator – Anne M Gorsuch, mother of current supreme court Justice Neil Gorsuch – was held in contempt of Congress for refusing to turn over documents about her agency’s allegedly lax efforts to clean up toxic waste.

Ruckelshaus said he accepted the job because he thought he could help staff re-establish the EPA’s credibility. Several thousand employees greeted his return with thunderous applause. One sign read: “How do you spell relief? Ruckelshaus.”

Reflecting on his long career in 2001, Ruckelshaus said: “At EPA, you worked for a cause that is beyond self-interest and larger than the goals people normally pursue. You’re not there for the money, you’re there for something beyond yourself.”

In recent years, he joined other former EPA directors in championing the agency against cuts or efforts to curtail its authority.

In late 2015, before receiving the Presidential Medal of Freedom from Barack Obama, he told the Guardian: “The [Obama] administration is trying to lead on climate change but they aren’t getting much support from the Republicans who have turned it into a partisan issue, which is too bad.

“If they are successful, that will set us back a fair bit. It won’t look good to the world and it won’t be good for the US.”

That was before Trump – about whom he said “I don’t know what Trump actually knows about climate change, I don’t think Trump thinks much about many of the issues” – won office.

In an interview with the Associated Press last year, Ruckelshaus’s criticism of moves to roll back environmental protections and give more regulatory power to states was withering. He said some states don’t have the resources to police big polluters, and others lack the will.

“The reason that the ultimate authority to enforce the law was put into federal hands was because the states weren’t any good at it,” he said. “The idea that you’re going to delegate it to the states … is completely fraudulent.”

Ruckelshaus was born in 1932 in Indianapolis to a family of leading Republicans. He told the Los Angeles Times in 1971 his interest in nature and conservation was rooted when his father took him fishing in northern Michigan.

Ruckelshaus as acting FBI director in May 1973. Photograph: Charles Gorry/AP

Between stints at the EPA, he moved his family to the Seattle area where he had spent two years out of high school as an army drill sergeant at the Fort Lewis. He graduated from Princeton University and Harvard Law School.

He led federal efforts to recover Chinook salmon and steered an ambitious state initiative to clean up and restore Puget Sound, where salmon and orcas are in danger. His focus on a collaborative science-based process helped set the course for the Puget Sound Partnership, charged with cleaning up the inland waters by 2020.

His daughter, Mary Ruckelshaus, was the agency’s chief scientist as her father led the leadership council that oversaw it.

Denis Hayes, who coordinated the first Earth Day in 1970, once called Ruckelshaus “a Republican environmental hero” and Washington governor Chris Gregoire described him as “big as the great outdoors”.

Ruckelshaus was on the boards of directors of several major corporations. He was senior vice-president for law and corporate affairs at the Weyerhaeuser before returning to the EPA. Some environmentalists criticized his close ties to some of the industries that the EPA regulated.

He was chief executive of Browning-Ferris Industries from 1988 to 1995 and chairman from 1995 to 1999. He was also a strategic director of Madrona Venture Group in Seattle, an early backer of companies such as Amazon.