Fashion flashback flattery!

Britney Spears was a major fan of Katy Perry's denim dress at the MTV Video Music Awards that harkened back to Spears and then-boyfriend Justin Timberlake's classic 2001 double all-jean ensemble.

"@katyperry Just when I thought the denim dress had retired....you bring it back! You looked amazing tonight bb ;)," Spears tweeted early Monday, responding to Perry's tweet that said: "@britneyspears I did my best impression, hope u likey!"

At Sunday's awards show, Perry also had a denim-clad guy on her arm: rapper Riff Raff, who collaborated with her on the tune "This Is How We Do." Riff Raff's suit and Perry's strapless dress, which featured a sultry slit, were both made by Versace.

Spears and Timberlake wore their matching looks to the 2001 American Music Awards.