SOUTH BEND, Ind. — An African-American official of South Bend, Ind., endorsed Joseph R. Biden Jr. for president on Friday, snubbing the city’s mayor, Pete Buttigieg, in a close-to-home example of Mr. Buttigieg’s struggle to attract black support.

The official, Oliver Davis, is a longtime Democratic member of the Common Council.

“In times like these, when the political winds are fiercely blowing across our country, it’s important for us to have an experienced leader who has been through the diverse storms of life to guide our country,” Mr. Davis said in an endorsement released by the Biden campaign.

Mr. Davis has been a frequent critic of Mr. Buttigieg since the mayor took office in 2012, seeking, for example, to tap the brakes on a signature initiative of the mayor’s to demolish or repair 1,000 run-down houses in 1,000 days. In 2016, he voted against the mayor’s effort to hire a diversity officer.

When a white officer from the South Bend Police Department fatally shot a black resident in June, setting off protests and anguished town hall events, the episode exposed deep distrust between the police and some members of South Bend’s minority community. Mr. Davis emerged as a sharp critic of the mayor’s management of the police in the national media.