Sofia Vergara is engaged after Nick Loeb popped the question to the Colombian catch before 90 of her closest friends, family and co-stars at an ancient monument in Mexico on Monday.

Sources tell Page Six that Loeb got on bended knee and proposed at the breathtaking 1,500-year-old Mayan pyramids of Chichen Itza in Yucatán.

After Vergara said yes to the Onion Crunch businessman, the engagement’s 90 witnesses — including “Modern Family” stars Jesse Tyler Ferguson, Julie Bowen and Sarah Hyland — hit the luxe Rosewood Mayakoba resort on the Riviera Maya to celebrate.

PHOTOS: SOFIA VERGARA

The group is staying at the resort to celebrate Vergara’s 40th birthday. Last night, sources said, the newly engaged couple and their guests were set to celebrate her big day and the engagement at the Mayakoba’s “beachfront palapa” for Vergara’s actual birthday night.

The betrothal came as a surprise, since just two months ago, Vergara and Loeb split after a series of arguments. But they quickly repaired their rocky romance.

One of Vergara’s pals on the trip, Fernando Fiore, tweeted a photo Monday that showed the saucy star with a hefty diamond on her left hand. He also tweeted pictures of T-shirts made especially for the adventure with an illustration of Vergara sporting a long mustache, a tight T-shirt and a sombrero reading, “Sofia’s 40th.”

The multiday party, which began Saturday, included trips to Cozumel and Playa del Carmen. Vergara has posted a series of pictures on her Whosay account of the celebrations with friends and family including her son, Manolo, her mom and her Colombian aunts. There is also a picture of her cuddling up to Loeb.

She and Loeb began dating in February 2010 and have had a roller-coaster relationship. During their brief split, Vergara was seen at a string of events alone, including the Met Ball and on nights out with her girlfriends. But she and Loeb reconciled weeks later. Their reps didn’t comment last night.