Floyd Mayweather (R) and Andre Berto

Floyd Mayweather earned a unanimous decision over Andre Berto to claim his 49th and he says final victim in a glittering unbeaten ring career spanning two decades.

All three judges ruled overwhelmingly in Mayweather's favor and afterwards the American welterweight world champion confirmed that he was retiring, saying: "My career is over.

"It's official."

He equals the perfect 49-0 record of heavyweight legend Rocky Marciano and retains his WBA and WBC titles, embellishing his reputation as the best boxer of his generation.

Mayweather fell to his knees in the ring after the bell, taking in the moment.

"I want to thank all the fans... for 19 years I would not be able to do it without these fans," he said, after the judges ruled it 118-110, 117-111 and 120-108, all to the champ.

"But you have to know when it's time to hang it up. I'm knocking at the door; I'm nearly 40 years old now.

"There's nothing else to prove in the sport of boxing. I'm leaving the sport with all my faculties; I'm still sharp and smart."