NEW YORK — William H. Gray III, a third-generation Baptist minister from Philadelphia who won a seat in Congress in 1978 and rose to become the highest-ranking black lawmaker in the country, died Monday in London. He was 71.
He died while attending the Wimbledon tennis tournament with his son Andrew, said William Epstein, who was Mr. Gray’s communications director in Congress. Epstein said that Mr. Gray had not been ill and that the cause was not immediately clear.
Mr. Gray, who served in the House from 1979 to 1991, was a persistent voice for equal rights, education, and services for the poor, in the United States and abroad. He pressed for more economic aid for Africa and was a leading critic of South African apartheid, helping shape US policy, including sanctions, against that country. He led the House Budget Committee in the 1980s, and his fellow Democrats selected him as majority whip in 1989, the third-ranking House leadership position.
Two years later, Mr. Gray surprised many people when he resigned to become chief executive of the United Negro College Fund. He led the nonprofit group to record fund-raising.
“Bill Gray was a trailblazer,’’ President Obama said in a statement, “the first African-American to chair the Budget Committee and to serve as the majority whip.”
Six years before he was elected to Congress, Mr. Gray became pastor of Bright Hope Baptist Church in North Philadelphia, and he would serve as pastor for 35 years. He succeeded his father, William, who preached there for 22 years, and his grandfather, William H. Gray Sr., who served from 1925 until his death in 1949. While in Congress, Mr. Gray would return to Philadelphia on weekends to preach.
Mr. Gray had not held elected office when he first ran for a House seat, in 1976, challenging the longtime incumbent, Robert N.C. Nix Sr., in the Democratic primary. Mr. Gray, who had once worked in Nix’s office, lost by fewer than 400 votes. Two years later, after accusing Nix of losing touch with his district, he won easily.
Mr. Gray was frustrated in his first years in Congress, giving up his seat on the Budget Committee in 1981 after complaining that Democrats were more interested in making deals with Republicans than in spending money on social services.
“It was clear that the Democratic leadership felt they did not want or need the liberal vote,” he said in an interview with Newsday in 1985.
But Mr. Gray returned to the committee in 1983 and eventually became known as a skilled negotiator and consensus-builder. When he became budget chairman, in 1985, some lawmakers asked whether a black representative from a district that was 80 percent black could see beyond the needs of his constituents.
“I face what all blacks go through,” Mr. Gray said in The New York Times in 1985. “People see your skin before they see anything else, and sometimes that’s all they see. But you’ve got to keep on truckin’ and hope you have the chance to demonstrate excellence.”
He added, “If I do an effective job as chairman, I will break down a barrier and demonstrate that race is not an obstacle to heading a major financial committee or winning a leadership post.”
William Herbert Gray III was born in Baton Rouge, La. He spent part of his childhood in Florida, where his father was president of Florida Normal and Industrial College, in St. Augustine, and later Florida A&M College, now university, in Tallahassee. The congressman received his bachelor’s degree from Franklin and Marshall College, in Lancaster, Pa., and divinity degrees from Drew Theological Seminary and Princeton Theological Seminary. He worked as a minister at Union Baptist Church in Montclair, N.J., for much of the 1960s while teaching at several colleges.
In 1994, President Clinton appointed Mr. Gray as a special adviser on Haiti.
In addition to his son Andrew, Mr. Gray leaves his wife, the former Andrea Dash; two more sons, William IV and Justin; his mother, Hazel; and several grandchildren.