By Jamila TrindleJamila Trindle is a senior reporter who covers finance, economics and business where they intersect with national security and foreign policy. Her beat spans everything from the economic underpinnings of conflict to sanctions, corruption and terror finance. Before coming to Foreign Policy magazine, Jamila reported for the Wall Street Journal’s Washington bureau, covering financial regulation and economics. She has also worked as a foreign correspondent in China, Indonesia and Turkey as a freelancer for NPR, Marketplace, The Guardian and others. She moved back to the U.S. to cover the post-crisis economy for PBS in 2009.

As the carnage continues in Ukraine – with scenes of wounded protesters, raging fires, and armed police in full riot gear — it’s easy to forget the whole crisis was set off by a disagreement over a loan.

Late last year, with Ukraine’s state coffers running low because of overspending on political priorities like subsidizing natural gas and increasing the wages of government workers, President Viktor Yanukovych faced a choice. The European Union offered a trade deal that promised to boost Ukraine’s sluggish economy in exchange for harsh and politically unpopular austerity measures. Russia offered $15 billion and didn’t ask Yanukovych to change much of anything. Unsurprisingly, he rejected the EU deal and opted for Moscow’s bailout instead. Thousands of angry Ukrainians took to the streets in protest, and they haven’t left.

Those early demonstrations were peaceful, but Ukraine has seen a spasm of bloodshed in recent days. Yanukovych called for a truce Wednesday and said he was ready for negotiations with opposition leaders. The deal collapsed almost immediately, and security personnel and protesters engaged in running battles throughout the day Thursday.

In response, European officials moved to sanction Ukrainian leaders. After an emergency meeting in Brussels, EU foreign ministers said that they would freeze the assets and revoke the visas of officials they consider responsible for the violence.The United States issued a similar visa ban on Wednesday.

The Russian government also pressured Yanukovych to restore stability, suggesting that it could withhold the next $2 billion installment of financial assistance. Prime Minister Dmitry Medvedev said Russia would "try to fulfill all our promises" to Ukraine, but that it could only deal with "legitimate and effective authorities – a leadership which people aren’t wiping their feet on like a doormat," according to Reuters. Russia had agreed in December to give the Ukrainian government $15 billion to replenish state coffers. The Russian deal also included a 33 percent discount on natural gas imports, which Ukraine depends on.

European officials turned toward sanctions after months of trying to cobble together a competing financial deal for Ukraine. U.S. Treasury Secretary Jack Lew reminded Ukrainian leaders Wednesday that they could still get a deal from the West in exchange for "steps to fix their economy."

While Kiev is still burning, it seems unlikely that Ukrainian officials would sit down with a bunch of bureaucrats at the IMF to talk about economic reforms. But if Yanukovych steps down or agrees to share power with opposition leaders, a new interim government could reopen those negotiations. That, in turn, could clear the way for Kiev to receive desperately needed funds.

"Ukraine is eminently salvageable," said Douglas A. Rediker, a visiting fellow at the Peterson Institute and a former IMF executive board member. "The economic issues that were confronting Ukraine were important, but not existential."

The Ukrainian government was facing a slew of economic issues that stemmed from the fundamental problem of spending more money than it was taking in. While the domestic economy sputtered, the government continued to increase wages, raise pensions and subsidize the country’s energy costs.

Yanukovych didn’t want to make any changes to that system for fear of weakening his grip on the country. Wealthy businessmen and people close to Yanukovych have grown wealthy, even as the rest of the economy slipped into recession.

"There’s a reason that Yanukovych’s son, a dentist by training, is now one of the most successful businessmen in Ukraine," said Steven Pifer, a former ambassador to Ukraine and a senior fellow at the Brookings Institution.

The Ukrainian government also sunk a lot of money into hosting the European soccer championships in 2012. Ukraine spent $14 billion to get ready to host the games with Poland, according to a Bloomberg report at the time.

But perhaps Ukraine’s biggest problem was paying a high price for imported natural gas and then selling it to consumers and businesses at a lower price.

The IMF criticized these energy subsidies in a December report that outlined a whole raft of changes that it wanted Ukraine to make. The government had agreed to many of them on paper when it accepted a $15 billion loan in 2010. In December, the IMF reiterated the need for those changes, including reducing the government deficit, reforming energy markets, and better regulating the banking sector.

The IMF said Ukraine’s high gas subsidies, which were 7.5 percent of GDP in 2012, led to "one of the highest energy consumption levels in Europe." The subsidy scheme led to a government deficit and losses at state-owned energy company Naftogaz, which was late on payments for gas imported from Russia.

Natural gas imports have often figured in disputes between Russia and Ukraine for years, with Russia periodically shutting off the spigot. Still, that didn’t stop Yanukovych from turning to Moscow when faced with what he considered onerous loan terms from the West.

Former IMF Chief Economist Simon Johnson said Ukrainian leaders were faced with a decision about whether to change the direction of the economy.

"Do you have a relatively few people get a lot of power and economic opportunities or do you have rule of law and a broader economy?" said Johnson, who is now a professor at the MIT Sloan School of Business.