Comedian Joan Rivers performed an impromptu wedding ceremony for a gay couple in New York City.

Jed Ryan and Joe Aiello, a couple of three years, were among those who attended a Barnes & Noble book signing for Rivers' latest book, Diary of a Mad Diva.

“While we were waiting, we were reading the book,” Aiello told Entertainment Tonight. “She mentioned being an ordained minister and I jokingly asked, 'Do you think it's true? Maybe she'll marry us.' And [Ryan] goes, 'Ask her.' So, I did.”

Rivers, 81, agreed to marry the couple. During the ceremony, Rivers said marriage was “honest to God forever.”

“It's wonderful,” Rivers said before pronouncing the men married. “You're my second marriage.”

“We weren't planning on this,” Aiello said after the ceremony. “This was kind of fun actually.”