A federal judge on Monday ruled that Illinois gay couples facing a terminal illness can marry immediately rather than waiting for a marriage law to take effect in June.

U.S. District Judge Sharon Johnson Coleman's ruling states that in order to marry early gay couples must apply through the Cook County clerk's office, marry in Cook County – which includes greater Chicago – and provide a doctor's note confirming that one partner is facing a terminal illness.

The ruling comes a month after another judge allowed a lesbian couple to marry before the law takes effect because one of the women is battling a diagnosis of terminal cancer.

(Related: Lesbian couple first to marry under Illinois marriage equality law.)

Plaintiffs in the case are four couples from Cook County, including one woman who has cancer and might not live until June, BuzzFeed reported.

Coleman noted “the intangible personal and emotional benefits that the dignity of equal and official marriage status confers” in her ruling.