The nation's first openly gay governor may soon get his divorce.

James McGreevey's marriage publicly unraveled four years ago when he told the world he was gay, and said he had a homosexual affair.

Now a state judge is preparing to grant a divorce as early as this week to the former New Jersey governor and his estranged wife, Dina Matos.

McGreevey, 50, and Matos, 41, who have been living apart nearly as long as they were together, are awaiting the dissolution of their marriage and a settling of their finances by Union County Superior Court Judge Karen Cassidy.

The couple went to trial this spring after failing to come to terms on alimony, support and whether McGreevey committed fraud by marrying even though he knew he was gay. They did agree to split custody of their only child, a 6-year-old girl.

"At the conclusion of the trial, the judge said she planned to have the verdict to counsel late July or early August," said McGreevey lawyer Stephen Haller. "She wasn't specific."

McGreevey, the Democratic governor elected in 2001, resigned in 2004, acknowledging in a nationally televised speech that he was "a gay American" who had an affair with a male staffer. The staffer denies the affair and says he was sexually harassed by the governor.

The McGreeveys split three months after the speech some four years into their marriage.

Besides issuing their divorce, Cassidy will rule on alimony and child support, and how their assets and liabilities should be divided.

The judge will not rule directly on Matos' fraud claim. However, whether she pursues it may depend on how she rules on Matos' bid to be compensated for the 13 months she would have lived in the governor's mansion had McGreevey not resigned in disgrace.

If she does proceed, testimony from Teddy Pedersen, a former McGreevey campaign aide who claims to have had three-way sexual trysts with the couple, will almost certainly be heard.

Lawyers submitted more than 200 pages of written summations of their positions on June 30.

Haller argued that McGreevey has no ability to pay alimony to his estranged wife. John Post, the lawyer for Matos, contended that McGreevey refuses to work so he can deny support to her and their daughter.

Matos has asked the judge for $2,500 a month alimony for four years, $1,750 a month support, and for McGreevey to foot her legal bills for the divorce, which exceed $250,000.

McGreevey does not want to pay alimony, and is hoping to be assessed support payments of about $100 a month based on state guidelines factoring in the incomes of both parents and their custody arrangements.

The couple's dire finances were laid bare during their bitter divorce trial.

Matos revealed that she had borrowed heavily to finance her $430,000 Springfield house, and smirked occasionally as her husband's lawyer mocked her inflated clothing budget of $700 a month as "absurdly disproportionate to her income." She lost her hospital fundraising job when the hospital closed in June.

McGreevey, meanwhile, acknowledged being broke. He lives in a Plainfield home owned by his boyfriend. He says he relied on his boyfriend to pay his legal bills. Now a full-time Episcopal seminary student, McGreevey makes about $48,000 a year as a consultant and adjunct professor.