GUATEMALA CITY — Three years ago, Guatemala became a startling example to Latin America.

Still battered by decades of civil war, it launched a corruption investigation that reached the highest level of government, drawing hundreds of thousands of supporters to the streets and ultimately landing the president, Otto Pérez Molina, in jail.

It was a feat for a fragile democracy and an inspiration in a region where elites were virtually untouchable and prosecutors were just beginning to tackle graft.

But now the nation risks becoming another kind of example — of the danger to institutions when the entrenched interests of the powerful are challenged.

The crisis was ignited when President Jimmy Morales, once the beneficiary of the commission’s investigations — they unseated his predecessor and helped pave the way for Mr. Morales’s unlikely victory in 2015 — found himself in the commission’s cross hairs.