The World Bank has quietly cancelled a "model" oil pipeline agreement with Chad after revenues meant to be spent on schools and hospitals were used to consolidate President Idriss Déby's grip on power.

The innovative deal, signed in 2000, was supposed to ensure that the oil wealth in one of the world's poorest and most corrupt countries was not wasted. But this week the World Bank confirmed that it had pulled out of the project it had helped finance, after Chad agreed to repay a $140m (£80m) loan ahead of schedule.

In a statement, the World Bank said that Déby's government had failed to "allocate adequate resources critical for poverty reduction" as set out in the original agreement.

"Regrettably, it became evident that the arrangements that had underpinned the bank's involvement in the Chad/Cameroon pipeline project were not working. The bank therefore concluded that it could not continue to support this project under these circumstances," it said.

The decision is deeply embarrassing for the World Bank. It had hoped that the experiment could serve as an example for other developing countries on how to ensure transparency and avoid the "resource curse", where the profits from a country's natural wealth are pocketed by the ruling elite.

Despite warnings from civil society groups that Déby's regime was incapable of effectively managing a sudden inflow of petrodollars, the World Bank agreed to part-finance the construction of a 620-mile, $4.2bn pipeline linking landlocked Chad to terminals on Cameroon's Atlantic coast. Its support added crucial credibility to what was at the time the largest ever private sector investment in sub-Saharan Africa - in one of the continent's most unstable countries.

In return for the World Bank's blessing, Chad's government agreed to spend 72% of oil royalties, expected to reach $1.4bn this year, on building schools, hospitals and roads. A further 10% was to have been held back for future generations. The safeguards were considered crucial given that reserves are only expected to last 30 years; the oil bonanza is Chad's one chance at rapid development.

But although an independent oversight commission was set up to monitor spending, it was prevented from properly doing its work once the oil began to flow in 2003. The anti-poverty spending targets never came close to being met.

Déby repeatedly tried to renegotiate to allow the government to spend more oil money as it pleased. He won some concessions from the World Bank in 2006, and then sought to deflect domestic criticism of the lack of development by arguing that outsiders "had imposed injustice on us". Describing the government's share of the revenue from the 170,000 barrels a day as "crumbs", he temporarily expelled US company Chevron and Petronas, the Malaysian state-owned firm, which together with Exxon Mobil run most of the oil operations in Chad.

Over the past year, as Déby's own future has looked increasingly insecure with rebels attacking the capital, he has signed decrees giving him greater personal control over the country's finances. A significant chunk of the oil revenue is believed to have been spent on the military.