Tedros Adhanom Ghebreyesus of Ethiopia was voted director general of the World Health Organization on Tuesday, the first African ever to head the agency.

The election was the first conducted by the W.H.O. under more open and democratic rules. After nearly two years of public campaigning, originally by six candidates, the voting took place in a closed-door session in which the health ministers of 186 countries cast their ballots in secret.

Dr. Tedros — a malaria expert who campaigned under his first name — ultimately beat Dr. David Nabarro of Britain after three voting rounds. The final tally was 133 votes to 50, with three abstaining or not voting. Dr. Sania Nishtar, a Pakistani cardiologist and expert in noncommunicable diseases, was eliminated after receiving 38 votes in the first round.

Dr. Tedros, 52, replaces Dr. Margaret Chan of China, who has held the post for a decade.

He is best known for having drastically cut deaths from malaria, AIDS, tuberculosis and neonatal problems when he was Ethiopia’s health minister. He trained 40,000 female health workers, hired outbreak investigators, improved the national laboratory, organized an ambulance system and oversaw a tenfold increase in medical school graduates.