Justice Ruth Bader Ginsburg made history last month when she presided over the first gay marriage inside the U.S. Supreme Court. But her role in the event wasn’t simply as the officiant.

One of the men who got married that day gave TPM the first look behind the scenes of the wedding. He said Ginsburg was hands-on from the moment she agreed to perform the ceremony. She even helped the couple write their vows.

“There was a lot of back and forth with her about the vows by email,” Ralph Pellecchio told TPM on Tuesday. “You could see by virtue of that that it was very meaningful to her.”

Pellecchio married his partner of 32 years, Jim Wernz, the associate director of palliative medicine at Maimonides Medical Center in Brooklyn, N.Y., on Oct. 26. Their home state of New York legalized gay marriage back in 2011, but it was the Supreme Court’s ruling in June that cleared the way for marriages on a state-by-state basis and finally prompted the pair to tie the knot.

Pellecchio was a student in one of Ginsburg’s classes in 1970s at Columbia Law School, but he said people were skeptical when he brought up the possibility of her overseeing the wedding. He said his relationship with Ginsburg was pretty typical of a former student, but he wanted to give it a try anyway.

“I came up with Justice Ginsburg and Jim and others said, ‘Well, she’ll never do it,’ but I decided to write my letter in any event,” Pellecchio said. “The gist of the letter was, ‘Next time you’re in New York, would you marry us? We’ll work our schedule around your schedule.'”

Pellecchio, who works as special counsel at Citigroup, said he sent the request to Ginsburg’s office Aug. 29 and received a response from Ginsburg in an email sent by one of her clerks the next day.

“She got back to me very quickly and said, ‘I’m not going to be in New York in the foreseeable future, but if you were to marry in D.C., I’d do it in a minute,” Pellecchio said. “This was over Labor Day weekend and so it happened pretty quickly after that.”

The day after Ginsburg agreed to the request, she ended up presiding over her first same-sex wedding ceremony at the Kennedy Center. However, Pellecchio said he didn’t know whether she would be performing same-sex marriages despite the fact that she had voted in favor of the ruling in June. (Ginsburg also presided over a same-sex wedding at a restaurant in Washington, D.C. on Sept. 22.)

After she agreed to perform the wedding Ginsburg corresponded with Pellecchio and Wernz extensively through her clerks as they worked on a script for the ceremony and vows.

Pellecchio and Wernz were accompanied to the court by a handful of immediate family members and “close friends.”

“The only downside to getting married in the Supreme Court is, we couldn’t have more than 12 or so people with us because it was in her chambers,” Pellecchio said.

Members of Ginsburg’s staff were also in attendance.

“She had her security detail there and some of the clerks in her chambers were doing their traditional Saturday work,” he said.

Before the wedding, Ginsburg gave the guests a brief tour of her chambers.

The ceremony itself lasted about thirty minutes. Pellecchio shared with TPM the script and schedule of the event.

The ceremony began with an introduction from Ginsburg, who rang a bell nine times before the couple exchanged their vows.

“The way she spoke to us during the ceremony, the way Jim describes it, it was as if we had a minister or rabbi that knew our family for years,” Pellecchio said.

Then, according to the script, she finalized things with a nod to the significance of the event.

“Mindful of the responsibility to which I attend,” Ginsburg said, “and grateful for the privilege accorded me at this happy moment, I do hereby, by the authority vested in me by the Constitution and the laws of the United States, declare your marriage valid and binding, and pronounce you married.”

Pellecchio and Wernz invited Ginsburg to the reception after the ceremony, but she said she would be unable to attend. She apologized for missing the party.

“I knew beforehand she wouldn’t be able to attend, but after the ceremony, she pointed to a huge stack, it was like a rolling bookcase of documents,” said Pellecchio. “This was what she had to do and so she apologized for not being able to attend, but she had work to do.”

A spokesman for the Supreme Court said Ginsburg would not immediately be able to respond to a request for comment on this story.

Full Disclosure: Pellecchio and Wernz are family friends of this reporter, who is very happy for them.

View more photos from the ceremony below:

Justice Ruth Bader Ginsburg and Ralph Pellecchio exchange paperwork during his wedding in her chambers.

Justice Ruth Bader Ginsburg signs a marriage certificate for Ralph Pellecchio and Jim Wernz during their wedding.

Ralph Pellecchio standing in the chambers of U.S. Supreme Court Justice Ruth Bader Ginsburg during his wedding October 26.

Ralph Pellecchio and Jim Wernz standing in front of the Supreme Court on the day of their wedding.

Ralph Pellecchio and Jim Wernz standing with their wedding guests in front of the Supreme Court.

Jim Wernz and Ralph Pellecchio displaying their wedding rings.

Photos courtesy of Ralph Pellecchio and Jim Wernz.