Sofia Vergara had a pretty serious wardrobe malfunction when the back of her sequined dress split apart just 20 minutes before she was due on stage at Sunday night's Emmy Awards. Oops!

The Modern Family star exposed her rearend after the zipper on her turquoise gown broke, prompting an emergency repair from her wardrobe team.

The Colombian actress ran backstage where her gown was stitched back together, before joining her fellow cast mates to collect the ensemble award for Outstanding Comedy.

Vergara posted a photo of the near tragedy on : "Yes!!!! This happend 20 min before we won!!!! Jajajajja. I luv my life!!!!"

The actress also thanked her wardrobe crew, adding, "20 min Modern Family won!! Dress malfuncion !!! Thank you emergency team!!!

Check out what she had to deal with and then SEE TONS OF PICS FROM THE EMMY AWARDS HERE!