Britney Spears was left shaken Wednesday after a man rushed her onstage.

The 35-year-old singer was ushered offstage after security apprehended a man mid-performance at her "Piece of Me" residency show in Las Vegas, according to E! News.

Spears was finishing her song "(You Drive Me) Crazy" when a fan crept onstage and rushed toward her. She initially didn't realize the man was behind her, asking the audience, "Are you guys having fun?"

Video of the incident shows Spears asking, "Is everything okay? What's going on?" as she notices the commotion. Her knees buckle as she clutches a security guard and asks, "He's got a gun?" before being taken offstage.

TMZ reported the man was subdued and ejected from the concert after struggling with security. The show marked Spears' return to The Axis at Planet Hollywood in Las Vegas following a near three-month hiatus.

"Missed being on stage... ready for Vegas tonight! I'm sooooo excited to see you all!!!" she wrote on Instagram prior to the concert.

Spears will continue her Piece of Me residency show through December. The singer shares two sons, 11-year-old Preston and 10-year-old Jayden, with ex-husband Kevin Federline.