CHICAGO — In a short ceremony inside their Chicago apartment, two beaming brides made Illinois history Wednesday as they became the first gay couple to wed under the state’s new law legalizing same-sex marriage.

The law approved last week doesn’t go into effect until June, but one of the women – Vernita Gray – is terminally ill with cancer, so she and her partner of five years, Patricia Ewert, were granted an expedited marriage license by a federal judge’s order.

The two made it official Wednesday in front of more than 20 friends at their high-rise home on the city’s North Side. A Cook County judge officiated, and a close friend who deemed himself the “flower girl” tossed rose petals and the couple kissed several times.

They were pronounced wife and wife.

“This is the realization of a very long cherished dream for them both,” Camilla Taylor, the head of the legal advocacy group Lambda Legal, which helped represent the couple, said before the wedding day.

When Illinois became the 16th state to legalize gay marriage earlier this month, it was bittersweet for the couple, in their mid-60s. They feared that Gray might not live until the law would allow them to wed. They filed a lawsuit, and a federal judge allowed the two women, in their mid-60s, to get an expedited marriage license.

“She went from one day being as full of energy as she could be to being completely bedridden,” Ewert said of her partner’s deterioration.

As for waiting until June, Ewert said: “It’s a long time in the cancer world.”

But the mood was cheerful and festive Wednesday; Ewert wore leopard print and Gray donned a dark leather jacket. They quick signed the papers after the ceremony.

“It’s a great day for Vernita and Pat, and an historic day for Illinois, for a deserving and loving couple to have the chance to be married on an expedited basis,” John Knight, LGBT project director at the ACLU of Illinois, said in a statement. “Their love and commitment to each other has been demonstrated over time, and we’re thrilled they didn’t have to wait.”

Their legal battle could be just the beginning and may fuel efforts to change the effective date of the law, which Gov. Pat Quinn signed last week. There’s legislation pending to allow the law to take effect immediately and it could come up in January when lawmakers assemble.