Paula Abdul closed out the Billboard Music Awards with a truly knockout performance — and Julianne Hough was almost a casualty of the former "American Idol" judge's choreography.

During her medley of hits, Abdul, 56, tossed her hat into the crowd ... and accidentally whacked the former "Dancing with the Stars" pro right in the neck.

Hough, 30, took the hit in the stride, dramatically gasping at the camera in the moment.

BILLBOARD MUSIC AWARDS 2019: WHAT THE STARS WORE

Posting a selfie in a neck brace after the show, Hough wrote, "The result of the honor of being hit in the neck by @PaulaAbdul's flying hat! Love you, babe!!!"

BILLBOARD MUSIC AWARDS 2019: ALL THE WINNERS

Abdul replied, "OMG I'M PEEING MY PANTS!!!! You know it was with love."

Paula Abdul accidentally whacked Julianne Hough with her hat toss at the 2019 Billboard Music Awards.

Paula Abdul accidentally whacked Julianne Hough with her hat toss at the 2019 Billboard Music Awards.

CLICK HERE TO GET THE FOX NEWS APP

Abdul’s show-stopping performance included her smash hits “Straight Up,”  “(It’s Just) The Way That You Love Me,” “Opposites Attract,” “Cold Hearted Snake” and “Forever Your Girl,” earning a standing ovation at the conclusion of her performance.