If it seems impossible that Venezuela’s government could have remained in power nearly two years into the country’s self-imposed economic collapse, consider that Naunihal Singh, a leading expert on power transitions and coups, is just as baffled as everyone else.

“It’s just perplexing,” Professor Singh said. “It shouldn’t be in anybody’s interests for the country to get destabilized to this extent and for this many people to starve.”

A hint as to why the crisis has stretched on lies in the growing dispute over legitimacy, just the latest sign of a monthslong deadlock over the country’s future.

Both Nicolás Maduro, the president, and Juan Guaidó, an opposition lawmaker who has pointed to Mr. Maduro’s widely disputed election victory, claim to be Venezuela’s legitimate leader. Military leaders, political elites, protesters and foreign governments have all weighed in.