Cannes competition player “We Need to Talk About Kevin,” Lynne Ramsay’s adaptation of Lionel Shriver’s bestselling novel, marks the helmer’s comeback nine years after her sophomore pic “Morvern Callar.” But it very nearly didn’t happen at all.

When the original financing fell through in 2008, the project was only saved by Ramsay’s willingness to tear up her script and rethink it for a much lower budget. The film was supposed to cost $12 million. But even with its star Tilda Swinton hot from her Oscar for “Michael Clayton,” the collapsing indie sales market simply wouldn’t support it.

The only option was for Ramsay to come up with a version that could be shot for $7 million. It wasn’t a question of just trimming a few scenes, but of reconceiving the project’s whole point of view.

The result, according to those involved, was an artistic revelation that kicked the project back into life.

“Actually, it was the creative unlocking of the movie,” says producer Luc Roeg. “What Lynne delivered was so visceral, so exciting, it more than ever represented a Lynne Ramsay movie rather than an adaptation of a very successful book.”

According to Swinton, “I think it gave Lynne a key to finding her own authorial voice inside the task of writing a screenplay inspired by and pretty faithful to a book by a writer — Lionel Shriver — with a very particular voice of her own.”

Ramsay, who also directed, herself is understandably reluctant to be held up as “the test case that cutting your budget will improve the script.

“I’ll have a hoard of directors baying for blood and a producers rubbing their hands,” she says. “It wasn’t so much a reduced budget that made it a better script, it was a question of honing and refining what I already had. Sometimes circumstances force you to use obstructions to your advantage.”

“We Need to Talk About Kevin” was brought to Ramsay in 2006 by her agent Jenne Casarotto, who was also repping the film rights to the novel. BBC Films jumped at the chance to develop the project with Ramsay. Because of the New York setting, Steven Soderbergh, a fan since “Ratcatcher,” and his then-partner Jennifer Fox joined as producers. Summit Entertainment lined up to co-finance and handle sales.

But then, as Ramsay recounts, “The recession kicked in and the market changed overnight. Suddenly a financier (Summit) who had seemed pretty solid for a year, and who’d approached me in the first place after somehow getting hold of an unsolicited manuscript, got cold feet. What seemed like a cinch before when these kind of edgy indie films could be made at a mid-range budget now was a much harder sell.”

With Summit out, the BBC found interest from New York-based Wayfare Entertainment, but it too fell away. In a last throw of the dice, British producer Roeg and his sales company Independent came aboard to try and find a different approach to the project, while Ramsay embarked on her rewrite. “I’d invested too much to let it flounder,” Ramsay says.

Finding one location in Connecticut that could serve as many settings (and provide a tax break) was key to make the new budget fit. With BBC Films still committed, Roeg pieced together the remaining coin from the U.K. Film Council, gap finance from Footprint, equity from Magna and post house Lipsync, plus a cornerstone U.K. pre-sale to Artificial Eye. Shooting started last April.

During Berlin, Independent nailed a key French sale to pave the way for the Cannes red carpet. It’s a happy ending, but Swinton, like Ramsay, cautions against using the film as an advertisment for slashing budgets.

“We were out on a limb, with slim pickings, and it was hairy to the very end,” Swinton says. “I would hate to think that filmmakers relying on the ‘necessity/mother of invention’ principle would ever be used to justify the kind of cuts that so often see films like ‘Kevin’ fold in pre-production. “