He’s the gaming world’s most successful outsider, who attacked Microsoft for threatening his fiercely protected independence.

Now Markus Persson, creator of the hugely popular Minecraft game, has been accused of selling out after agreeing a deal with the software giant which would make him a billionaire at 35.

Minecraft, the virtual building game which uses Lego-style blocks, has become a phenomenon – with 54 million sales across all platforms – since Mr Persson began coding it in 2009 in his spare time.

The Swede, who initially sold the game only through his own website, had previously cancelled a deal with “creepy” Facebook and lambasted other technology titans for seeking to undermine the independence of gaming developers. And two years ago Mr Persson said Microsoft’s Windows 8 operating software was a threat to the gaming ecosystem.

“Got an email from Microsoft, wanting to help ‘certify’ Minecraft for win 8. I told them to stop trying to ruin the PC as an open platform,” he tweeted. “I’d rather have Minecraft not run on win 8 at all than to play along. Maybe we can convince a few people not to switch to win 8 that way.”

After turning down previous approaches from Electronic Arts and Microsoft, Mr Persson has surprised the gaming world by starting fresh discussions to sell his Swedish company, Mojang, to the computer giant for an estimated $2bn (£1.2bn).

Minecraft creations Show all 5 1 /5 Minecraft creations Minecraft creations Taj Mahal The original Taj Mahal may have taken almost two decades to complete, but this is a worthy tribute Minecraft creations Hyperscale Minecraft players have taken inspiration from some of Europe’s most beautiful cities, complete with canals and elaborate architecture. Minecraft creations Ancient Metropolis Users have created “The Golden City”, with extremely ornate architecture, similar to Cambodia’s Angkor Wat complex Minecraft creations Desert island An ornate island created by one user Minecraft creations Rocket launch pad Prepare for take off with this Minecraft rocket

Mr Persson’s change of heart is believed to have been inspired by a positive working relationship he forged with Microsoft when Minecraft, which places gamers in a monster-infected pixellated landscape, came to the Xbox games console.

The developer, who is known to gamers as “Notch” and who spent periods unemployed before discovering his coding skills, quickly agreed a price with Microsoft and could quit the company once a deal is concluded, sources close to the negotiations said.

Microsoft believes it can boost sales of Minecraft – and of Xbox – by creating new editions of the game and setting up a film and merchandising franchise. However, Mr Persson’s willingness to sell has troubled Minecraft’s loyal audience.

“How those indie values sell out in the face of cash,” tweeted Cathy-Anne O’Brien, CEO of a Toronto PR firm.

Markus Persson, creator of the gaming company Mojang (PA)

“Hope you don’t sell out all the fans. Microsoft will be the end of MC,” tweeted another gamer.

Justin Davis, editor of the computer games website IGN.com, warned: “The PS4 and PS3 (and maybe even iOS and Android) versions of Minecraft would either be removed, or would no longer receive updates.

“To play Minecraft, you [will] have to do so on Windows or Xbox. This isn’t an unreasonable thought for a Microsoft exec that just spent billions.”

Microsoft could “crack down on individuals making and promoting other real-world brands within their game” and assimilate Minecraft into its own development team after the departure of Mr Persson and his co-founders, Mr Davis added.

Microsoft sources claim the company will keep the game available for the PlayStation and rival products and that the iOS versions are unlikely to be threatened.