Montgomery, which was incorporated on Dec. 3, 1819, has long been a central part of the United States’ sordid racial history. It was the first capital of the Confederate States of America in 1861 and is home to the church where the Rev. Dr. Martin Luther King Jr. planned the Montgomery bus boycott, which made Rosa Parks a household name.

Mr. Reed’s election “will send a signal to the entire country that Montgomery is moving forward in a positive way,” said the Rev. Edward J. Nettles, a prominent pastor in the city of about 200,000 people, 60 percent of whom are African-Americans.

The current mayor of Montgomery, Todd Strange, decided not to run for re-election after serving since 2009.