Ethio­pian Prime Minister Meles Zenawi, who was once hailed as a major U.S. ally against terrorism but whose 21-year rule was tarnished by the killing and jailing of political protesters and a grisly border war with former ally Eritrea, died Aug. 20 of an undisclosed illness. He was 57.

Ethio­pian officials said Mr. Meles died in a Belgian hospital after contracting an infection, the Associated Press reported. But the circumstances of his death remained laced with intrigue.

The highly active prime minister attended the Group of 20 summit in Mexico in June but had not been seen in public for about two months. Government officials were vague about his whereabouts, saying he was suffering from an illness after receiving medical treatment in an unspecified hospital in Europe.

Mr. Meles, a onetime Marxist guerrilla who redefined himself as an economic reformer, was a strategic U.S. military ally in the Horn of Africa. He allowed the United States to send drones from Ethio­pian territory into neighboring Somalia. With Washington’s backing, he sent Ethio­pian troops into Somalia to fight Islamist and other anti-American militants between 2006 and 2009.

His death plunged his impoverished nation of 75 million people into political uncertainty. Developments were being watched closely in Washington, which has provided ­­more than $2 billion in aid to Ethi­o­pia since 2010. The Washington area is home to more than 200,000 Ethio­pian immigrants, the largest population of Ethiopians outside the country.

Historically known as Abyssinia, Ethi­o­pia was a monarchy for much of its history and was ruled from from 1930 to 1974 by Emperor Haile Selassie I. He was replaced by Soviet-backed dictator Mengistu Haile Mariam, who ruled from 1974 to 1991. The country has suffered droughts, famines and grinding poverty that led to violent dissent.

Like many modern African leaders, Mr. Meles began his dramatic rise to power when he joined an armed rebel group. He quit medical school at Addis Ababa University in 1974 and went to the bush to wage a revolution against Mengistu’s repressive communist regime.

At first, Mr. Meles fought briefly on the front lines with the Tigrayan People’s Liberation Front, which he helped mobilize when he was 20. He rose quickly to take over the leadership in 1989.

By that time, the Mengistu regime was deeply unpopular at home and abroad. Mengistu’s policies — neglecting regions and ethnic groups that did not support him — were said to have worsened a famine that claimed 1.5 million lives from 1983 to 1985.

Mr. Meles and a slew of united rebel groups, including those fighting to found a new Eritrean nation, finally overthrew Mengistu in 1991. Mr. Meles became Ethiopia’s president in 1991 and prime minister four year later. Eritrea seceded from Ethiopia once Mengistu had fallen.

Mr. Meles quickly backed away from his self-described “intellectual communist views” and became what the Ethio­pian and foreign news media described as a “mellowed Marxist” pragmatic in courting Western donors.

Mr. Meles was hailed as part of a “new breed” of African leaders who would enforce term limits and allow political opposition and civil society to flourish.

In March 1998, President Bill Clinton met with Mr. Meles during a diplomatic trip to Africa. Shortly thereafter, Mr. Meles led his country to war with Eritrea. The brief but bloody 1998-2000 border war cost an estimated 100,000 lives.

Mr. Meles represented Africa at Group of Eight, G-20 and climate change meetings. But his reputation quickly soured among human rights groups that documented killings of political opponents and the jailing of reporters. Mr. Meles also repeatedly broke promises to let others have a chance at governing.

“I would love to be the African leader that steps down, that overthrows this idea of a Big Man ruler. I don’t want to stay in office forever,” he told The Washington Post in the aftermath of Ethiopia’s May 2005 election, when 193 political protesters and seven police officers were killed during street demonstrations.

That week, top leaders of the Coalition for Unity and Democracy, the opposition party that had made significant gains during the election, were imprisoned along with an estimated 30,000 people in a vast crackdown.

Mr. Meles defended the arrests in the interview. “It was insurrection, and in my view that’s treason,” he said. “Democracy is about having the rule of law.”

In 2010, Mr. Meles and his party won reelection in a landslide, capturing all but two of 547 parliamentary seats. The European Union and the United States contended that the poll was flawed. Mr. Meles described an E.U. monitoring report as “trash that deserves to be thrown in the garbage.”

Meles Zenawi was born Legesse Zenawi on May 8, 1955,in the northern town of Adwa. As a young rebel ­later, he took the nom de guerre Meles to honor Meles Tekle, a Tigrayan nationalist student killed by Mengistu’s ethnic Amhara-dominated government.

Mr. Meles married Azeb Mesfin, a former rebel fighter in the liberation struggle. In addition to his wife, survivors include three children.

Even his critics acknowledged that Mr. Meles oversaw some of the fastest growth in sub-Saharan Africa, including the construction of roads and bridges, built in part with extensive foreign investment and the long-term leasing of large tracts of farmland to China and India, said John Harbeson, an African studies lecturer at Johns Hopkins University’s School of Advanced International Studies.

At the same time, “there has been significant displacement of rural populations,” Harbeson said.

Mr. Meles once hinted at the personal stress of ruling when an Ethio­pian journalist asked whether he thoughts his eldest daughter should go into politics. “If you have the fire, go for it,” he said. “If you do not, stay as far away from it as you possibly can, for your own health.”