"Modern Family" beauty Sofia Vergara had a wardrobe malfunction just minutes before she made her way to the 2012 Emmy Awards on Sunday.

Dressed in one of the most glamorous gowns of the night, a teal cut-out Zuhair Murad gown, Vergara ripped the back zipper of the dress before her big night out. She tweeted the mishap to her followers, which revealed half of her butt as she was wearing a thong beneath the gown. 

(View the NSFW photo here).

“Yes!!!! This happened 20 min before we won!!!! Jajajajja. I luv my life!!!!” Vergara wrote as a photo caption. Evidently, her fans did not mind the nudity, as the picture was shared at least 2,000 times on the social media site.  

One fan wrote in response, “I could look at this for the rest of my life ...”

Fortunately for the Columbian stunner, her wardrobe team was able to fix the malfunction before the Emmy Awards red carpet.

While the “Modern Family” actress was up for an award for Best Supporting Actress, she lost to her co-star Julie Bowen, though Vergara did not seem too sad about it.

She told Extra TV: "I brought a lot of people from my family. They wanted to come here with me. There are 19 people, and they love coming here with me, so we have a great time."

Vergara certainly did have a lot of fun, as she tweeted pictures at the Emmy Awards afterparty of herself dancing and having a great time as everyone stood around, staring at her and taking pictures. On one photo she tweeted, she wrote, “This is how the Colombians partyyy at the Emmys!!”