The winner of the last eight bout was guaranteed a medal but in truth, the number one seed Rabii was too good for Donnelly despite the split decision.

The first round was a close affair, and although the favoured Moroccan didn't land a great deal of power punches, he did score with enough eye-catching shots to take the opener on all three cards.

The world champion's class began to show the moment the bell rang to signal the start of the second, with Rabii connecting with a hard right hand flush on Donnelly's cheek. The Irish welterweight tried to force a few openings but his highly regarded opponent gave little away in defence as Donnelly attempted a comeback in round two.

One judge opted for Donnelly after the second but with two going for Rabii, it left the Irishman needing a huge final round to win.

There was a clash of heads at the start of the third round, but the referee gave Donnelly a standing count, which he did again after the Irish boxer stumbled over his own boot following a punch at the death.

The strange officiating decisions in the last round made for an obscure final scorecard, with Rabii winning 29-27 on two and Donnelly taking the other 29-27.

The loss means that Ireland only have two boxers left competing at the 2016 Olympics, Michael Conlan and Katie Taylor.