A retired US Episcopal bishop who was accused of heresy for ordaining a gay man has died aged 87.

Walter C Righter was an assistant bishop in Newark, New Jersey, in 1990 when he ordained Barry Stopfel, who he knew was gay and not celibate, as a deacon.

Stopfel was later ordained as a priest by Bishop John Spong.

Righter also signed a statement supporting the ordination of non-celibate gay people and called for women to be ordained.

Five years later, formal charges of heresy were filed against Righter. A panel of bishops voted 7-1 to dismiss the charges.

Righter later said that he had ordained “a person who had met all the tests every other person is expected to meet before ordination. In a sense, it was more than time for this ordination to occur, honestly and publicly”.

According to the Washington Post, during his trial, he introduced himself as “Walter Righter, the heretic”, while his wife wore a badge saying “heretic’s wife”.

Righter served as Bishop of Iowa for 16 years, before retiring in 1998. He began serving as an assistant bishop in Newark the following year.

He died at his home near Pittsburgh on Sunday after a long illness.

In a statement, Presiding Bishop Katharine Jefferts Schori said: “The Episcopal Church can give thanks for the life of a faithful and prophetic servant.

“His ministry will be remembered for his pastoral heart and his steadfast willingness to help the church move beyond old prejudices into new possibilities.”

Bishop Gene Robinson of New Hampshire, who was the first openly gay man to be ordained as a bishop in 2003, said: “Bishop Righter is one of the giants on whose shoulders gay and lesbian Christians stand.”