"He's a great fighter but I'm a great fighter and I showed it," Alvarez said.
The two boxers switched roles from their first fight, with Triple G trying to counter Alvarez and the Mexican fighter coming forward much of the fight. Both landed well to the head and Golovkin (38-1-1) controlled some rounds with his jab, though neither were ever in any trouble of going down.
The fight was a rematch of a draw last September that left neither fighter satisfied. This time, it was Golovkin who was upset and he stormed out of the ring without talking.
"I can't complain, that's what we have the judges for," said Abel Sanchez, Golovkin's trainer.
Ringside punch stats showed a close fight, though they favoured Golovkin by a small margin.
Golovkin was credited with landing 234 of 879 punches, while Alvarez (50-1-2) landed 203 of 622.
Almost immediately, there was talk of a third fight between two middleweights who now know each other well.
"If the people want us to do it again, let's do it again," Alvarez said. "For now, I'm going to enjoy it with my family."
Alvarez seemed to take control of the fight in the middle rounds, but Triple G came on strong in the final few rounds to make it as close as it could be.
Golovkin landed several big punches to start the 12th round but still lost it on the two scorecards that ended up favouring Alvarez.
- AP