PORTRUSH, Northern Ireland — Rory McIlroy should be revered as one of the greatest ambassadors to golf in both Ireland and Northern Ireland. He is, after all, the greatest champion either has produced.

Instead, the 30-year-old McIlroy has spent some of his adult life unfairly caught in the middle of a political tug-of-war between the two, each of which has gone to great lengths to claim him as its own.

As his star burned brighter and his profile raised en route to him winning four major championships by age 25, life became complicated at times for McIlroy, who enters this week’s British Open as one of the favorites at Royal Portrush, which is about 60 miles north of where he grew up in Holywood, a seaside Northern Ireland town just outside of Belfast.

Suddenly, the world around him wanted to know McIlroy’s allegiance: Northern Ireland or Ireland?

McIlroy, in his mind, is both, preferring to steer clear of the political and religious differences between Northern Ireland, where he grew up, and the Republic of Ireland, for whom he competed and which he represented so often as a youth golfer.

This all came to a particular head in 2016 before the Olympics in Brazil, where golf became an Olympic sport, with people wanting to know whether McIlroy was going to represent Ireland or the UK as a Northern Ireland native.

Understandably, McIlroy wanted no part of the issue and, citing the threat of the Zika virus, he ended up not playing.

The next Olympic Games take place next year in Japan and McIlroy plans to play and has announced that he plans to represent Ireland, which has some in Northern Ireland agitated.

“I think personally I needed to do a lot of inner thought and sort of [ask], ‘Is this important to me? Why do I want to play it? Who do I want to represent?’ ’’ McIlroy said Wednesday on the eve of the British Open at Portrush, a gem of a golf course at the top of Northern Ireland. “At the start, whenever I was thinking of playing the Olympics, I think I let other people’s opinions of me weigh on that decision. And at the end of the day, it’s my decision. I can’t please everyone. The only people that really care about who I play for, who I represent, don’t mean anything to me. I don’t care about them.’’

His Olympic allegiance aside, McIlroy is as keen on ending his five-year drought without a major this week as he is hoping this Open at Portrush becomes a unifying symbol for those in Northern Ireland and Ireland.

“Sport has an unbelievable ability to bring people together,’’ McIlroy said. “We all know that this country sometimes needs that. This has the ability to do that. That could be the biggest impact this tournament has outside of sport, outside of everything else — the fact that people are coming here to enjoy it and have a good time and sort of forget everything else that sort of goes on.

“So I think no matter what happens this week, if I win or whoever else wins, having the Open back in this country is a massive thing for golf. And I think as well it will be a massive thing for the country.’’

Of the fact a British Open is being staged at Portrush for the first time since 1951, McIlroy said, “I think it just means that people have moved on.

“It’s a different time. It’s a very prosperous place. I’m very fortunate that I grew up just outside Belfast and I never seen anything.’’

The “anything’’ to which McIlroy referred are incidents from the often-violent political unrest locally called “the Troubles.’’

“I remember I watched a movie a couple of years ago, it was just called ‘71’ [and was] about a British soldier that gets stationed at the Palace Barracks in Holywood, which is literally 500 yards from where I grew up and it basically follows him on the night of ‘the Troubles’ and all that,’’ he said. “I remember asking my mom and dad, ‘Is this actually what happened?’

“It’s amazing to think 40 years on it’s such a great place, no one cares who they are, where they’re from, what background they’re from, but you can have a great life and it doesn’t matter what side of the street you come from. I think that’s what I was talking about [with] legacy of this tournament, to be able to have this tournament here again.

“I think it speaks volumes of where the country and where the people that live here are now. We’re so far past that. And that’s a wonderful thing.’’