CORK, Ireland (AP) -- After months of indecision over who to represent, Rory McIlroy announced Wednesday that he will play for Ireland - not Britain - at the 2016 Olympics in Rio de Janeiro.
The 25-year-old McIlroy, who is from Northern Ireland, was eligible to play for either Ireland or Team GB when golf makes its return to the Olympics in Brazil for the first time since 1904.
Having played all of his amateur golf under the auspices of the Dublin-based Golfing Union of Ireland, the two-time major winner opted to stay with Ireland for the Olympics.
''I have been thinking about the decision a lot and remembered all the times I represented Ireland as an amateur,'' McIlroy said on the eve of the Irish Open in Cork. ''I was always very proud to put on the Irish uniform and play as an amateur and as a boy, and I would be very proud to do it again.''
Citizens of Northern Ireland, which is part of the United Kingdom, can hold both British and Irish citizenship. Most of the Protestant majority is British, most of its Catholic minority Irish.
McIlroy, while raised a Catholic, grew up in the predominantly Protestant town of Holywood east of Belfast and once said he considered himself more British than Irish.
His 2012 comments - suggesting he might prefer to join the British team - provoked strong ill feelings from Irish golf fans. McIlroy initially said he might skip Rio entirely to avoid alienating fans further.
Two other top Northern Ireland golfers, Darren Clarke and McDowell, are Protestants who have identified with Ireland.
McIlroy has twice played in golf's World Cup for Ireland, both times alongside fellow Northern Irishman Graeme McDowell.
''Just because I'm getting paid to play this great game now doesn't mean I should change (teams),'' McIlroy said. ''So I'm very happy with my decision. It means I can look forward to the Olympics in a couple of years' time - you know, if I qualify, obviously, for the team.
''I just thought it was the right thing to do. It was the right time to let everyone know. Now I'm really looking forward to Rio in '16.''
McIlroy announced his decision ahead of next month's International Golf Federation meeting that will finalize the eligibility criteria for the 2016 and 2020 Olympics.
''There's no point in delaying it and letting it linger any longer,'' he said. ''Watching the World Cup in Brazil, thinking about Brazil in a couple of years' time, it just sort of got me thinking, maybe I should just go ahead and get it out of the way.''
Still, McIlroy said, winning an Olympic medal would not match winning a major championship.
''The majors in our sport are the biggest and best prizes in the game,'' he said. ''But as hopefully golf grows in the Olympics and becomes, say, bigger in four or five games down the line, then it might become bigger.''
Associated Press Writer Shawn Pogatchnik in Dublin contributed to this report.