A terminally ill woman in Illinois has been granted an early license to wed her partner seven months before the state’s same-sex marriage laws come into effect.

US district judge Thomas Durkin on Monday ordered the Cook County clerk to issue an expedited marriage license to Chicago couple Vernita Gray and Patricia Ewert.

Illinois Governor Pat Quinn signed the state’s equal marriage bill into law earlier this month, although weddings are not set to take place until June 1, 2014.

Ms Gray is currently terminally ill with cancer, which has spread to her bones and brain.

Doctors have told her that she is not expected to live until June.

Cook County Clerk David Orr, who supported equal marriage, said he would comply with the judge’s order.

In a statement he said: “My office will comply with the judge’s orders and expedite a marriage license to this couple – a service already granted to heterosexual couples in similar situations.”

Ms Ewert will be guaranteed protection under the ruling if Ms Gray dies. The couple plan to marry next week.

In an interview with the Chicago Tribune, Ms Gray said: “The fight for same-sex marriage and benefits is very real to me because if something should happen to me, I want her to get the benefits of my hard work.”

Barack Obama, who served as a senator for Illinois before he became president, said the passing of the equal marriage bill was a proud moment for his former home state.

Illinois is the 16th state to allow same-sex marriage.