A Powerball winner is allowed to stay anonymous while collecting her $560 million jackpot, a New Hampshire judge ruled on Monday.

The winner sued the New Hampshire Lottery last month under the name of Jane Doe, in a bid to collect the winnings through a trust to protect her anonymity.

The lawsuit challenges the New Hampshire Lottery's rule that she must identify herself in order to collect her money. A judge in the New Hampshire Superior Court ruled in her favor, according to her lawyer, William Shaheen.

Related: Powerball winner sues New Hamphire Lottery to stay anonymous

"If I told you she was ecstatic it would be an understatement," Shaheen said in an email to CNNMoney. "We are very pleased with the judge's order."

The judge had already ruled last month that the winner could start collecting funds while remaining anonymous as the issue played out in court.

"While we were expecting a different outcome and believed the state had a strong argument, we respect the court's decision," said a statement from the New Hampshire Lottery. "That said, we will consult with the Attorney General's office to determine appropriate next steps regarding the case."

The winner will collect a lump sum of about $358 million, before subtracting for taxes, according to the New Hampshire Lottery.

In her lawsuit, she said that disclosing her identity "would constitute a significant invasion of her privacy," and that previous winners have been "victims of violence, threats, harassment, scams and constant unwanted solicitation."

The winning ticket was purchased on Jan. 6 at Reeds Ferry Market in Merrimack, near Nashua.