Getty

Keith Urban is in the middle of a bizarre controversy after performing an LGBTQ+ anthem at Mar-a-Lago with the prez in the room ... but the country star wasn't trying to send a message, TMZ has learned.

Here's the deal ... KU played Chappell Roan 's “Pink Pony Club" among other tunes during a private gig for Pratt Industries ... an annual event at Trump 's second home, for staff and partners of the biz headed by billionaire Anthony Pratt . A mixture of criticism and cheer was instantly dished out online as soon as a clip was posted, with some asking ... WTF?

A source close to Keith tells TMZ ... Keith playing “Pink Pony Club” at the event -- with Trump unexpectedly in attendance -- was not a political statement, despite the rampant online speculation.

KU has been

See Full Page