CARSON, Calif. -- The fight wasn't the mega event unified middleweight world champion Gennady Golovkin expected to take part in, but that did not stop him from making boxing history Saturday night at StubHub Center.

Golovkin blew away last-minute substitute opponent Vanes Martirosyan with a devastating knockout in the second round to retain his title for a record 20th consecutive time to tie the all-time 160-pound division mark set by legend Bernard Hopkins in 2005.

Golovkin, boxing's longest-reigning active world champion, was supposed to headline a major HBO PPV event in a rematch with Canelo Alvarez on Saturday at T-Mobile Arena in Las Vegas, but after Alvarez failed two Voluntary Anti-Doping Association-administered drug tests for the banned performance-enhancing drug clenbuterol in February, the fight was called off.

With or without Alvarez, GGG was determined to fight Saturday, and he took a massive pay cut -- from a mid-eight-figure payday for the Alvarez sequel to $1 million -- as promoter Tom Loeffler scrambled to make it happen. They settled on Martirosyan, a selection met by tremendous criticism because he was coming off a loss, he hadn't fought in two years, and he was moving up in weight to face the most fearsome middleweight on the planet.

In fact, the IBF, which sanctions one of the belts Golovkin holds, viewed Martirosyan as such a weak opponent that it refused to approve the fight, so that belt was not at stake.

But Martirosyan was in shape, he was near weight, and he has a bit of a fan base in his hometown of nearby Glendale. Plus, he fit the budget to the tune of a $225,000 purse. Since desperate times call for desperate measures, Loeffler was able to quickly make a deal with Martirosyan promoter Don King, with the fight being moved to regular HBO and the StubHub Center.

In the end, Martirosyan, who declared Golovkin the hardest puncher he has ever faced, served as the fodder most expected him to be.

Punch stats Punches Golovkin Martirosyan Landed 36 18 Thrown 84 73 Percent 43% 25% -- Courtesy of CompuBox

"It feels great to get a knockout," said Golovkin, who had gone the distance in his previous two fights, a close win against Daniel Jacobs and a heavily disputed draw with Alvarez in September that most thought Golovkin won. "Vanes is a very good fighter. He caught me a few times in the first round. In the second round, I came out all business after I felt him out in the first round."

Golovkin (38-0-1, 34 KOs), 36, a Kazakhstan native fighting out of Santa Monica, started quickly, firing right hands and jabs down the middle and backing Martirosyan up as the crowd of 7,837 broke into the chant of "Triple G! Triple G!"

Martirosyan had one good moment in the round when a right-left combination backed Golovkin up. But Golovkin put him away with ease in the second round. He rocked Martirosyan, (36-4-1, 21 KOs), 31, with a right uppercut and went at him with abandon. He connected with a nine-punch flurry that included several clean, powerful punches, including a brutal right hand that started the sequence. Martirosyan, who had never previously been stopped, even in two junior middleweight title fight losses, went down face-first, and referee Jack Reiss counted him out at 1 minute, 53 seconds.

"It was like being hit by a train," Martirosyan said. "It wasn't one punch. It was all of his punches. It was the hardest I have ever been hit."

According to CompuBox punch statistics, Golovkin landed 36 of 85 punches (43 percent), and Martirosyan connected on 18 of 73 (25 percent).

Several minutes after the fight, Golovkin returned to the ring to salute his fans and take a bow as they continued to chant his name. Many will look forward to his next move. He is expected back in the fall, possibly for the rematch with Alvarez, who plans to return Sept. 15. His suspension will be lifted Aug. 17.

Earlier this week, Golovkin said he wasn't sure whether he would face Alvarez again because he is still angry about the failed tests and because Alvarez has not enrolled in a testing program since the fight was canceled. But when asked if he wanted to fight Alvarez again in September, Golovkin said he did.

"Absolutely," Golovkin said. "I want everyone. I have lots of belts. I challenge anyone to come and take my belts. I don't care who it is. Let's clean the division out. Happy Cinco de Mayo."