"Stop," the Korean pop sensation said midway through the song. "Hammer time."
Once Hammer took the stage, the two broke into a choreographed mashup of "Gangnam Style" and Hammer's 1991 hit "2 Legit 2 Quit," with everyone in the audience on their feet and dancing.
Afterwards, Psy — who says he's a longtime Hammer fan — called the performance a "miracle." "That was so awesome," he told CNN backstage.
Hammer, meanwhile, said they are "kindred spirits" and indicated that he would be open to collaborating again. "He's got the whole world dancing," he told CNN.
Watch their performance below: