The International Monetary Fund threw a new twist into the long and intense drama over Greece’s debt crisis this week, coming out publicly against the terms of the country's European-led bailout deal. But the IMF’s move wasn’t a sudden one: The blistering assessment released this week caps years of growing concern within the organization over lending to countries without an assurance of long-term debt sustainability, analysts say.

The IMF’s four-page debt sustainability analysis, which was sent to European leaders during the marathon bailout negotiations over the weekend and released to the public on Tuesday, warned that the deal doesn’t go far enough to address what it called Greece’s “highly unsustainable” public debt. Athens now owes its creditors more than 300 billion euros ($330 billion). “The dramatic deterioration in debt sustainability points to the need for debt relief on a scale that would need to go well beyond what has been under consideration to date,” the analysis read, going on to suggest a 30-year grace period on Greece’s European debt.

The assessment marked the first time the organization, which has a history of dealing with debt restructurings for low-income countries, has openly argued for a write-down of public debt for a high-income country. Tuesday’s document also exposes a rift between the IMF and European leaders who have refused an option for a debt write-down under the current bailout plan. Analysts say the leak of the debt assessment catapulted the issue into the public eye and prompted the IMF to finally go public with its study, but the tensions have been simmering for years.

Much of the trepidation stems back to 2010 after the IMF got involved with Greece’s first bailout deal as part of the so-called troika of lenders, which included the European Central Bank and European Commission. Meg Lundsager, who served as the United States’ executive director on the International Monetary Fund until last year, said the concerns were already palpable during her time at the organization. “There was a sense among the membership that a program has to lead to sustainability. You don’t want to have an IMF program where you’re setting up the program to fail,” she said.

“I think you could see hints as early as 2011 or so, in statements signaling that [the IMF] thought there needed to be a longer-term framework for debt, although it was all coded at the time,” said Robert Kahn, senior fellow for international economics at the Council on Foreign Relations and a former IMF official. Those concerns escalated after subsequent bailouts for Ireland and Portugal, and with Greece’s second bailout in 2012, in which the IMF supported a restructuring of Athens’ private debt.

The IMF had dealt mostly with private debts and low-income countries’ debts until the Greece crisis. Through its association with the Paris Club group of creditors, it routinely sent debtor countries on a path toward debt restructuring, but the 2012 write-down for Greece’s private debt shifted that paradigm.

In a 2013 IMF assessment looking back at Greece’s 2010 bailout, the organization admitted that projections on Greek economic growth may have been too optimistic, and raised the question over whether debt restructuring should have been part of the package. “An upfront debt restructuring would have been better for Greece although this was not acceptable to euro partners,” the assessment said.

At the same time, the IMF has been resisting pressure to bend or break its own rules on lending. In 2010, a new “systemic exemption” policy allowed it to lend funds to Greece without having to declare that the country had a high probability of maintaining sustainable debt – a loophole that allowed the IMF to lend money without hampering its credibility. But the organization has been trying to eliminate that policy. “The Fund is trying hard to put pressure on governments to get more support through debt relief so they can be comfortable saying a program is strong and justify lending. But it’s a political battle,” Kahn said.

The IMF no longer applies the “systemic exemption” policy to Greece, which is turning its attention back on sustainability projections, Lundsager said. “Looking at Greece’s numbers, the IMF just doesn’t feel that it sees the private sector coming in to replace official debt. And if the private sector does come in, you’re going to have it at much higher interest rates and that will put Greece back on an unsustainable path unless there is significant easing of repayment terms or outright haircuts,” she said.

“In public debate, particularly given that the Greek government had such unorthodox policy proposals, the Fund was very much closely aligned with creditors on policies, and so these differences in views on debt were not material in that moment,” Kahn added. “But now, of course, there’s an extraordinarily large financing need for Greece.”

The Greek parliament passed the bailout deal late Wednesday, but the IMF’s report raises new questions on whether Germany’s central bank will approve the program, knowing that IMF support hinges on a measure it had long resisted. Lundsager sees a difficult slog ahead in any case. “It’s going to be very hard for the Greeks, even if they pass all the reforms, to implement it all and get some growth going,” she said. “It will just be such a hard road for many years to come.”