Modern Family star Jesse Tyler Ferguson married longtime partner Justin Mikita in New York on Saturday.

Ferguson's on-screen partner Eric Stonestreet was in attendance, along with co-stars Julie Bowen and Ty Burrell. Jerry O'Connell and wife Rebecca Romijn and Star Trek Into Darkness star Zachary Quinto were also on hand for the ceremony, along with So You Think You Can Dance host Cat Deeley and judges Nigel Lythgoe and Mary Murphy.

Ferguson appeared as a guest judge on the show in May.

Ferguson and Mikita have been dating for two years, and the actor popped the question last year during a trip to Mexico.

Last month, while appearing on talk show The View, Ferguson shared that the couple planned their wedding in New York because it was legal there.

"[Same sex weddings weren't] legal in California up until yesterday," he said, explaining why the couple, who live in California chose to marry in New York.

"Weddings are expensive, y'all, and we wanted to give that money to a state that accepted us as an equal. We're too far down the planning path to change," he added.

Early Sunday morning the star tweeted, "Never been happier. XO Goodnight!"