LIBREVILLE, Gabon — There was probably no leader on the African continent who exemplified the conflict between the American government’s interests and its highest ideals better than Prime Minister Meles Zenawi of Ethiopia.

Mr. Meles, who died on Monday after more than 20 years in power, played the American battle against terrorism brilliantly, painting Ethiopia, a country with a long and storied Christian history, as being on the front lines against Islamist extremism. He extracted prized intelligence, serious diplomatic support and millions of dollars in aid from the United States in exchange for his cooperation against militants in the volatile Horn of Africa, an area of prime concern for Washington.

But he was notoriously repressive, undermining President Obama’s maxim that “Africa doesn’t need strongmen, it needs strong institutions.”

Mr. Meles was undoubtedly a strongman. Despite being one of the United States’ closest allies on the continent, Mr. Meles repeatedly jailed dissidents and journalists, intimidated opponents and their supporters to win mind-bogglingly one-sided elections, and oversaw brutal campaigns in restive areas of the country where the Ethiopian military has raped and killed many civilians.