David Ortiz snapped a selfie with the president using a mobile device manufactured by a big company. (Will Mcnamee / Getty Images)

That fun moment when David Ortiz snapped a selfie with President Obama at the White House on Tuesday?

It was as gleefully spontaneous as Ellen DeGeneres’ Oscar gang-selfie — which is to say it wasn’t at all. It was just a promotional stunt.

Ortiz, as Sports Business Journal reported, signed an endorsement deal with Samsung on Monday and was camera-ready for the president. It isn’t certain whether the president was aware that Samsung had helped Ortiz, which the company confirmed to the Boston Globe.

(Sarah Parnass / Washington Post)

“We were thrilled to see the special, historic moment David Ortiz captured with his Galaxy Note 3 during his White House visit,” Samsung told the Globe. “It was an honor to help him capture such an incredible and genuine moment of joy and excitement. Similar to the selfie Ellen was able to capture during the Oscars, this was an opportunity for David to share the incredible moment with his fans.

“When we heard about the visit to the White House, we worked with David and the team on how to share images with fans. We didn’t know if or what he would be able to capture using his Note 3 device.”

The stunt worked. Ortiz’s tweet of the photo has been retweeted almost 39,000 times.

Samsung strikes again. (Photo by Ellen DeGeneres / Twitter via Getty Images)