The Competition Commission said the shareholding, which Ryanair has held for seven years, weakens its main competitor and could prevent Aer Lingus from combining with another airline in order to build scale.
Ryanair boss Michael O'Leary said the company will appeal against the ruling and called the report "bizarre and manifestly wrong".
Aer Lingus chairman Colm Barrington said the ruling showed that its main rival's shareholding went against the interests of 14 million passengers flying between Ireland and the UK.
"It was unacceptable that our principal competitor was allowed to remain on our share register with a shareholding of 29.82% and interfere with our business despite the European Commission blocking both Ryanair's first hostile takeover attempt six years ago and its most recent hostile takeover attempt earlier this year," he said.
Mr Barrington said Aer Lingus will now be in a position to grow and become an even stronger competitor in the market.
Ryanair will appeal against the UKCC's ruling to the UK Competition Appeal Tribunal.
Mr O'Leary said the decision had been expected and that the UKCC had made its mind up in advance.
"This prejudicial approach to an Irish airline is very disturbing, coming from an English government body that regards itself a model competition authority," he said.
Mr O'Leary added: "It would appear to be a case of one rule for the UK airlines but an invented set of rules for two Irish airlines."
The competition watchdog has also ordered Ryanair not to seek or accept board representation or acquire further shares in Aer Lingus.
Its ruling, which followed a provisional decision against Ryanair, found the minority shareholding was likely to impede or prevent Aer Lingus from being acquired by, or combining with, another airline.
There were also concerns that the stake was likely to affect Aer Lingus's commercial policy and strategy by allowing Ryanair to block special resolutions, restricting Aer Lingus's ability to issue shares and raise capital and to limit Aer Lingus's ability to manage effectively its portfolio of Heathrow slots.
Simon Polito, the commission's deputy chairman and chairman of the Ryanair/Aer Lingus inquiry group, said there is intense competion between the two airlines for passengers between Ireland and the UK.
He said rivalry for customers was as strong now as when Ryanair started its share buy-up in 2006.
'However, we consider that there is a tension between Ryanair's position as a competitor and its position as Aer Lingus's largest shareholder, and that Ryanair has an incentive to weaken its rival's effectiveness as a competitor," Mr Polito said.
"Ryanair proposed various remedies to us in an attempt to address our specific concerns. In a dynamic and uncertain sector such as the airline industry, however, it is inherently difficult to design remedies that would cater for all eventualities.
"We concluded that the effective and proportionate remedy that would address our concerns was to require a partial divestment of Ryanair's shareholding to 5% facilitated by the appointment of a divestiture trustee."