LAS VEGAS — Marcos Maidana did everything but beat Floyd Mayweather Jr., taking him 12 tough rounds before losing a majority decision.
Mayweather remained unbeaten Saturday night, but not by much. Maidana swarmed all over him from the opening bell and gave him perhaps his toughest fight in a 16-year professional career.
In the end, though, Mayweather got the win — just as he did in his previous 45 fights. He retained his welterweight title by winning, 117-111, on one scorecard and 116-112 on another. A third judge had it even at 114-114.
The Associated Press scored it for Mayweather, 115-113.
Maidana threw far more punches, but Mayweather was more accurate with his as the two battled into the late rounds with the fight still very much in doubt. Cheered on by a large contingent of Argentine fans, Maidana took the fight to Mayweather, who was cut by the right eye in the fourth round by an accidental head butt.
‘‘It was a tough, competitive fight,’’ Mayweather said. ‘‘I normally like to go out there and box and move. But he put pressure on me. I wanted to give the fans what they wanted to see so I stood and fought him.”
Maidana raised his arms in victory when the final bell sounded, and Mayweather watched pensively from his corner as the scorecards were added up before he was declared the winner.
‘‘I think I won the fight,’’ Maidana said. ‘‘He didn’t fight like a man.’’
Punch stats by Compubox showed Mayweather landing 230 of 426 punches to 221 of 858 for Maidana. It was the most punches landed by any fighter against Mayweather in 38 fights where punch stats were compiled.
‘‘I couldn’t see for two rounds after the head butt,’’ Mayweather said. ‘‘After I could see again it didn’t both me. That’s what champions do, they survive and adjust.’’
Maidana had said before the fight he was going to treat Mayweather like any other fighter and go right after him. He did just that, bringing the sellout crowd at the MGM Grand hotel to its feet as he landed some big overhand right hands to the top of Mayweather’s head.
‘‘He never hurt me with a punch,’’ Maidana said. ‘‘He wasn’t that tough, I thought I won.’’
Maidana complained about being forced to fight with gloves he didn’t want to use when the two camps engaged in a standoff over gloves at the rules meeting a day earlier.
‘‘If I would have had my gloves I would have knocked him out,’’ Maidana said. ‘‘They took away my advantage.’’
Mayweather, who earned $32 million for the fight, was a 6-1 favorite coming to remain unbeaten. He had picked Maidana as an opponent because Maidana beat Adrien Broner in an upset in December, but he almost made the wrong pick.
Mayweather seemed confused early and unable to adapt to the wild punches thrown by Maidana. It wasn’t until the middle rounds that he got into more of a rhythm, hitting Maidana with hooks to the body and right punches to the head.
Still, the fight was in doubt late as Maidana wouldn’t quit coming forward. With the crowd on its feet in the final round he tried to land big punches, but Mayweather was able to escape most of them.
Maidana, who was cheered by the crowd as he left the ring, said he wanted a rematch, and both promoter Richard Schaefer and Mayweather said he just might get one after nearly pulling off one of the biggest upsets in recent years.
‘‘If the fans want to see it again, let’s do it again,’’ Mayweather said.