South Africa’s top opposition party elected its first black leader on Sunday, in a bid to build support beyond its traditionally white base and challenge two decades of postapartheid rule by the African National Congress.

Mmusi Maimane was elected the new leader of the Democratic Alliance by a majority of 1,400 party delegates in the coastal city of Port Elizabeth.

Mr....