Big battle today at Trump International with Clear CEO Garry Singer @McIlroyRory @PaulONeillYES @realDonaldTrump Drain the putt... pic.twitter.com/AZJqEVtlBT — ClearSports (@ClearSportsLLC) February 19, 2017

Rory McIlroy was simply doing what he was supposed to be doing: playing golf.

But the four-time major champion is facing sharp criticism from the media and his fans for playing a round with President Donald Trump.

On Sunday, the Clear Sports & Entertainment company tweeted a photo of McIlroy, former New York Yankees outfielder Paul O'Neill and Clear Sports CEO Garry Singer on the course.

McIlroy and Trump played at Trump International Golf Club in South Florida. McIlroy, a four-time major champion, has come under fire for his decision to golf with the president.

WATCH: MMA Fighter Shows Why You Should Never Dance During a Match

These Dads Dancing Ballet with Their Daughters Will Steal Your Heart

"I literally can't believe that McIlroy has done this," said former golf correspondent for The Guardian Lawrence Donegan.

"You don't turn down a round of golf with the American president but you do turn down a round of golf with this American president," said sports journalist Ewan McKenna.

The criticism escalated further on Twitter.

Why in heaven's name would Rory McIlroy play golf with Trump?

I hope he never wins another tournament. — Jack Todd (@jacktodd46) February 21, 2017

Rory McIlroy's been out playing golf with Trump I see. Hope Day, Spieth and Johnson ruin him this season. — aflame with wisdom (@peakcommunism) February 21, 2017

@McIlroyRory disgusted & ashamed that my countryman #rorymcilroy thought it appropriate to golf with vile hate-monger Trump. — Hedley Lamarr (@Stromboli53) February 21, 2017

@morningireland Rory McIlroy is the most mercenary of a mercenary breed - the pro golfer - from the Olympics to Trump - crawling & grasping — pauldolan (@DolanEdward) February 21, 2017

I wonder how many shots Rory McIlroy hit into the bunker or the water hazard so as not to excessively embarrass Trump. — Lucien Crowder (@LucienCrowder1) February 21, 2017

@shannoncoulter Please add Rory McIlroy to your list and any company that endorses him. He played golf with Trump this weekend. Thanks! — J Wallace (@juliewallace85) February 21, 2017

Mark Cuban's No. 46 Jersey at NBA Celeb Game Was Apparent Jab at Trump

Best Day Ever... Woman Nails Half-Court Shot, Then Gets Marriage Proposal

Fox News Channel's Brenda Buttner Passes Away