LOS ANGELES - Samsung says the Oscars selfie that went viral was a "surprise for everyone," after reports it was part of a pre-planned marketing stunt by the company, a sponsor of the Academy Awards.

But the South Korean tech giant, which earned huge publicity when Ellen DeGeneres used a Samsung device to take the photo, said it would donate $3 million to charities of the Oscar host's choice.

The Wall Street Journal reported that the stunt "wasn't entirely unplanned," saying that a Samsung smartphone was used in the show as part of a sponsorship and $20 million advertising deal with Oscar broadcasters ABC.

During rehearsals Samsung executives trained DeGeneres in how to use the Samsung Galaxy, it reported.

Other media noted that, while the host used the Samsung device for the viral selfie, she used her own iPhone to tweet other posts from backstage.

In a statement which arguably fell short of a denial that the stunt was pre-planned, Samsung said the selfie was something "nobody expected."

"While we were a sponsor of the Oscars and had an integration with ABC, we were delighted to see Ellen organically incorporate the device into the selfie moment that had everyone talking," it wrote.

"A great surprise for everyone, she captured something that nobody expected," it wrote.

It added that "in honor of this epic moment," which has generated over 3 million retweets so far, it would donate $1.5 million to two charities chosen by DeGeneres: St Jude's and the Humane Society.

DeGeneres, who said Twitter officials contacted her to say she broke the record, had her eyes on the prize even before posting the photo, encouraging viewers of the widely-watched show to retweet it and break the record.

Viewers obliged. Within five minutes, it had nearly 100,000 retweets. Less than 90 minutes after that, her tweet had garnered more than 1.9 million retweets and nearly 900,000 "favorites."