Actress Sofia Vergara arrives at the 64th Primetime Emmy Awards in Los Angeles
Actress Sofia Vergara arrives at the 64th Primetime Emmy Awards in Los Angeles. Reuters

Modern Family star Sofia Vergara suffered a wardrobe malfunction just minutes before she made her way to the 2012 Emmy Awards.

The Colombian beauty wore a teal-green Zuhair Murad gown with a halter-top neckline and kept the rest of her outfit simple, opting for Neil Lane jewels and left her hair down.

However things went wrong when Vergara ripped the back zipper of the dress before her big night out.

The incident happened 20 minutes before she was supposed to take to the stage at the LA Nokia Theatre, and she tweeted the mishap to her followers, which revealed half of her rear as she was wearing a thong beneath the gown.

"Yes! This happened 20 mins before we won!!! Jajajajja. I luv my life!!!" she tweeted. (View the NSFW photo here).

However her fans did not mind the exposure, as the picture was shared at least 3,000 times on the social media site.

"I could look at this for the rest of my life...," one fan wrote.

With instant help from her wardrobe team, the error was fixed before the Emmy Awards red carpet.

"20 min Modern Family won!! Dress malfunction !!! Thank you emergency team!!" she wrote.

Though the 40-year-old actress was up for Best Supporting Actress and lost to her co-star Julie Bowen, she did not seem to be bothered about it. She was seen partying at the TV awards, celebrating Modern Family's triple win for Comedy Series and Bowen and Eric Stonestreet's acting.

She concluded with a string of posts regarding the Emmy's with the message: "Good night Emmys!! What a fun night!! See u next year!"

She also brought her family members to join the festivities.

"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," she told Extra TV.

Vergara recently told Colombia Reports that she's more than happy with the acting work she has been doing.

"I never thought of becoming an actress like Penelope Cruz, who has been acting all her life," Vergara said. "She has gone to acting school, and she is a serious actress. I prefer doing comedy. I have always been naturally inclined to do it."