Madonna’s been a very naughty girl — but only for a few moments.

If you were among the legion of fans who turned out over the weekend to see “Die Another Day,” the latest James Bond thriller, and think you momentarily saw Madonna in the high-adrenaline flick, you’re right.

Get push notifications with news, features and more.

In fact, it’s probably safe to say more people caught a glimpse of her this weekend than during the entire run of “Swept Away.”

Not only did the Material Girl perform the Bond movie’s title song, she enjoyed a cameo as the character Verity. Reuters reports that when Madonna was putting together the theme song, she mentioned to director Lee Tamahori (whose credits include “Once Were Warriors” and 1996’s “Mulholland Falls”) that she wouldn’t mind a bit part in the film.

Although the part hadn’t been fully realized, Tamahori told the 44-year-old actress and singer about a small role, which he originally envisioned as a “quasi-lesbian, dominatrix fencing instructor.”

Plus, he promised the star “a smashing costume,” according to Reuters.