Madonna and Queen Latifah on Sunday joined Macklemore & Ryan Lewis and vocalist Mary Lambert during their performance of gay marriage anthem Same Love.

Queen Latifah entered the stage through a church door to officiate over the weddings of 33 gay and straight couples.

“We are gathered here to celebrate love and harmony in every key, in every color,” Queen Latifah told the audience. “As I look out on this audience I'm delighted to see the faces of 33 couples who have chosen this moment to celebrate their vows with us here in Los Angeles and everyone watching around the world as witnesses.”

Queen Latifah asked the couples to exchange rings.

“By the power vested in me by the state of California, I now pronounce you a married couple,” an enthusiastic Queen Latifah belted out as Madonna walked through the same door.

“Open your heart to me, baby. I'll hold the lock and you hold the key,” sang Madonna, dressed in a white cowboy outfit.

One of the couples who married consisted of Spencer Stout and Dustin Reeser of Salt Lake City. Video of the couple's musical proposal in the lumber aisle of a Home Depot went viral, racking up more than 11 million views on YouTube since September.

(Related: Home Depot flashmob ends with gay marriage proposal.)

Dustin told the The Salt Lake Tribune that despite the broadcast their wedding was “still very special and intimate.”

Queen Latifah told reporters after the performance that she “didn't get ordained but I'm a commissioner.”

“Everybody should get to fall in love with someone and make a life together and be protected under the law,” Queen Latifah said. “And so, I'm all for that, and I'm glad to have been able to support it and be part of it. I think it's where the future is going. We need to be there, right now.”

Macklemore & Ryan Lewis went on to win four Grammys, including Best New Artist, Best Rap Performance (Thrift Shop), Best Rap Song (Thrift Shop) and Best Rap Album (The Heist). Same Love, however, lost in the Song of the Year category.