When Ecuador struck oil in the 1970s, the tiny group of wealthy families who ran the place bought themselves mansions and

private jets. They threw a few bones to the poor: subsidies for gas and food. But then the price of oil plummeted. Suddenly, they were broke.

So they borrowed more money from the United States and the International Monetary Fund. Once again, they stuffed their own pockets with cash. But this time, they gave almost nothing to the poor. The United States and the IMF wouldn’t let them. The loans were conditioned on free-market reforms: reducing subsidies, selling off state-owned enterprises, and letting foreign oil companies have their way.

Understand that history, and you will understand why the poor people rose up and toppled three presidents in Ecuador. You will also understand the meteoric rise of Rafael

Correa, who has built a career on criticizing the IMF and the United States.

“Correa comes from that virulent reaction of people not just sensing that they were getting screwed over, but seeing it,” said J.D. Bowen, an assistant professor of political science at Saint Louis University.

Correa isn’t your average politician. He’s an economist, one of the few to get a chance to put his theories into practice. In 2001, he earned his Ph.D. from the University of Illinois at Urbana-Champaign. His dissertation examined why market-oriented reforms of the 1980s failed to make Latin America better off.

He concluded that the Americans pushing those policies didn’t understand the vast inequality in Latin America between the elite, who controlled everything, and the poor, who just got the scraps.

“To listen to them talk about the free market where most people do not have access to good education, good health, good wages, it was crazy,” Correa said in an interview during a recent visit to Boston. It’s one thing to sell off state-owned enterprises in Britain, where ordinary people have money to buy stock. It’s another thing to auction them in a country of peasant farmers who have no way to participate.

In Illinois, Correa learned that the United States doesn’t always practice what it preaches. When it comes to protecting their own vulnerable industries, Americans push the free market aside.

Ultimately, he came to view capitalism and socialism as sets of tools to fix problems. The question was: Whose problems are you fixing? The problems of the majority? Or the elite?

After he got his degree, Correa returned to Ecuador to teach economics. He wrote memos for the Ministry of Finance, and swiftly got appointed minister. But he grew impatient with the ministry’s submissiveness to the IMF. He quit with a big speech that made him famous. In 2006, he ran for president against Ecuador’s richest man — a banana magnate — and won.

Since then, he is best known in the United States for rejecting a free trade agreement, refusing to renew the lease on a U.S. military base, and offering refuge to Julian Assange. On Capitol Hill, he’s been called everything from an “irresponsible rogue” to a tyrant who stifles the press. It is true, especially in recent years, that he has used a heavy hand against his critics in the media and in some nongovernmental groups.

But his record speaks for itself. Correa has used Ecuador’s oil wealth to target inequality, investing in education and infrastructure. Poverty has dropped from 35 percent in 2007 to 27 percent in 2012, according to World Bank data. Per capita income has risen from $3,310 to $5,170. Today, Ecuador has one of the fastest-growing economies in the region.

Perhaps one of the reasons that Correa has been so successful is that he isn’t really the reckless ideologue that he pretends to be.

He may have announced in fiery speeches that he refused to pay back those “fraudulent” international loans. But quietly, he cut a deal that bondholders were willing to accept. Unlike Venezuela’s Hugo Chavez, Correa has been “very pragmatic,” says Hans Humes, a longtime investor in Ecuador.

So maybe, at the end of the day, Correa is not a man who rejects the power of the market’s invisible hand, but rather someone who thinks the hand works best after inequality is addressed. Wealth and power are inextricable. When a tiny group of the elite control everything, it hijacks the invisible hand to serve its interests alone. That’s not just a lesson for Latin America. It’s one we should learn here in the United States.