Featherweight champion McGregor had stepped up two weight classes to fight Diaz at welterweight in March but was submitted by the Californian in the second round.

On Saturday at the T-Mobile Arena both fighters did heavy damage but neither could find the knockout blow over five bloody rounds. Judges gave McGregor a majority decision victory, setting the stage for a third fight.

McGregor downed Diaz early in the first round with a stinging left hand and fought a tactical fight, peppering his opponent's front leg with kicks.

Diaz hit the deck twice early in the second round but McGregor declined to take the fight to the mat, signaling for Diaz to get up.

Known for his durability, Diaz then landed two telling strikes of his own, forcing McGregor back against the cage toward the end of the round and grabbing the momentum.

Diaz came close to finishing it in the third but McGregor somehow stayed on his feet despite a series of heavy blows.

Both fighters were struggling with fatigue in the final two rounds, which were heavy on clinches around the cage, and Diaz managed to take McGregor down in the final seconds of the fifth.

The flamboyant McGregor is the biggest draw in the UFC, as shown by his $3 million paycheck for Saturday's fight.

While a third fight between the two would be a huge draw, the UFC is keen for McGregor to defend the featherweight title he won by beating Jose Aldo last December or to vacate it.

In Saturday's co-main event, top light heavyweight contender Anthony Johnson knocked out Glover Teixeira with a thundering right uppercut to put himself into contention for a title fight against champion Daniel Cormier.