The State Lottery Agency says it wants to return $3 million in fees submitted by backers of a failed bid for the Baltimore slots license.

But with so many lawyers, former business partners and vendors claiming the cash, officials have turned to a court to figure out who should get it.

Now a new group is demanding the money: the people of New Mexico.

Lawyers working for the New Mexico attorney general's office say the money paid in support of Canadian developer Michael Moldenhauer's bid came from proceeds of an alleged pay-to-play scheme involving the son of a friend of former New Mexico Gov. Bill Richardson.

In papers filed last week in Baltimore Circuit Court, New Mexico says it wants the money back and will use it "to fund public education and government programs for the benefit of the citizens of New Mexico."

Dana P. Moore, an attorney who represents Moldenhauer, disputes New Mexico's claim and says the $3 million should be returned to the Toronto homebuilder.

"They say they can prove the money came from ill-gotten means," Moore said. "I don't think they can prove that. I don't think they can substantiate that."

It is the most recent twist in the long campaign by Moldenhauer to build a casino in Baltimore — and it draws Maryland, unwittingly, into the alleged scheme surrounding public investment funds that sank Richardson's nomination for secretary of commerce in the administration of President Barack Obama.

Moldenhauer's Baltimore City Entertainment Group was the sole bidder for the license to run a casino on Russell Street near the sports stadiums.

Officials envisioned a 3,750-machine slots casino, the second-largest in the state, that would generate nearly $430 million annually. It was supposed to open this year.

The state slots commission rejected Moldenhauer's bid in December 2009, citing his group's failure to meet deadlines or pay millions of dollars in required fees, and a lack of clarity about who would control the project.

Moldenhauer later filed lawsuits against the city and state. The commission has attempted to move on with a new round of bidding for the Baltimore license, with applications due in September.

Moldenhauer has said that he still is interested in building a casino in Baltimore.

Moore warned that the legal wrangling over the $3 million fee would have a "chilling effect" on others considering building a casino in the city. Would applicants see their fees refunded if their bids failed?

"It is a very bad message to send out to the business community," Moldenhauer's attorney said.

Moldenhauer's group included local businessmen, a former casino executive and Marc Correra, a placement agent in New Mexico.

Correra and Moldenhauer had attempted to do business together before, proposing to build a casino at a racetrack in Raton, a small city in northern New Mexico, near the Colorado border. That project also stalled.

Court documents show the $3 million application fee was supplied in February 2009 via three wire transfers — two from Marc Correra and one from an organization owned by his father, Anthony Correra, a Democratic fundraiser and Richardson friend.

Within months of the transfers, the New Mexico State Investment Council said Marc Correra had earned millions of dollars in fees from financial firms that had sought to invest part of the state's $12 billion endowment.