Doris Ward, a fierce advocate for racial and economic equality who became the first African American president of San Francisco’s Board of Supervisors, died Saturday at her home in San Francisco after a brief illness. She was 86.

Ward started her lifelong fight for social justice with the NAACP in Indianapolis in the late 1960s, opposing the Ku Klux Klan, and started her political career in 1972 after moving to San Francisco, when she ran a successful campaign to become a trustee for the city’s Community College District.

She won a seat on the Board of Supervisors in 1979 — and 11 years later became the first black person to serve as board president. She had been the top vote-getter in the citywide election the previous November, and at that time, the top vote-getter was appointed board president by fellow supervisors.

On the board, she gained a reputation for always battling for the underdog. Ward wrote rent control legislation, fought for divestiture from investments in apartheid South Africa and for better oversight of police, and steadfastly pushed for more affordable housing.

“If we don’t do something, it will be true what everybody says about San Francisco: that it is a place where only the rich and well-do-do can live,” Ward was quoted as saying in The Chronicle in 1990 as she presented a raft of measures designed to preserve the city’s low-cost housing.

In a statement, Mayor Mark Farrell hailed Ward as a “fearless political leader” and a “trailblazing presence whose courage and resolve helped inspire countless others to follow in her footsteps.”

One of those countless others was Supervisor London Breed, who is running to become the first African American woman to serve as San Francisco’s mayor — and is now president of the board.

She said she had looked up to Ward since the time she met her as a high school student. Ward, she said, “was nice to me, told me I was smart, told me the kinds of things you should tell young people to inspire them. She was a good lady — and she called me with good advice for the rest of her life.”

Ward resigned from the board in 1992 so Mayor Frank Jordan could appoint her county assessor-recorder, a position that would bring intense scrutiny.

After winning two terms, in 1994 and 1998, Ward became the focus of an FBI probe of a no-bid contract she awarded to a political consultant who had worked on her campaign. Ward was never charged with wrongdoing, but she was defeated in 2002 in her bid for another term.

“What really blew me away was how positive she was,” said Breed, who worked on that last campaign for Ward. “I loved her attitude, her spirit, how she treated people.”

The Rev. Amos Brown said what stood out perhaps most about Ward for him was “her respect for education and hard work, and her respect for the dignity and worth of all people — from the high and the mighty to the drunk on the corner.”

“Whenever there was a controversy and people were running around in circles, she would always raise the piercing question, ‘What are you doing to deal with this matter?’” said Brown, longtime pastor of the Third Baptist Church which Ward attended. “She was a doer.”

In 2000, Ward represented California as a delegate to the Democratic National Convention.

Born in Chicago on Jan. 27, 1932, Ward spent most of her childhood in Gary, Ind., where her family relocated and owned a grocery store. She attended an integrated school from kindergarten through 12th grade, helped lead the debate team and early on learned to stand up for herself against racist bullies.

“Even though I recognized from a very early age what racism was, I didn’t let that daunt me,” she told the San Francisco Examiner in 1980. “When they closed one door, I opened another.”

She went on to attend Indiana University for her bachelor’s and master’s degrees in education. While a student, Ward was active in the civil rights movement and participated in sit-ins at bars and other public areas. Later she earned a master’s degree in counseling from San Francisco State University and a doctorate in education from UC Berkeley.

Ward is survived by a sister, Debra Floyd, of Washington, D.C.; two nieces, Latonya Obijifor of Atlanta, Ga., and Desnee Flakes of Aiken, S.C.; and two nephews, Cordell Olive of Washington, D.C., and Joseph Floyd of Gary, Ind.

Private services will be held in Gary, with a celebration of Ward’s life to follow in San Francisco.

Kevin Fagan and Sarah Ravani are San Francisco Chronicle staff writers. Email: kfagan@sfchronicle.com, sravani@sfchronicle.com Twitter: @KevinChron, @SarRavani