Supporters of Maryland gubernatorial hopeful Douglas F. Gansler dropped a lawsuit Wednesday that sought to keep Democratic rival Anthony G. Brown’s running mate from raising money during the legislative session, saying the issue is now “moot.”

Daniel M. Clements, a lawyer for the Gansler supporters, cited a recent letter to The Washington Post written by Brown, the state’s lieutenant governor, indicating that his running mate, Howard County Executive Ken Ulman (D), “never intended” to solicit campaign contributions during the 90-day session.

“We won,” Clements told reporters following a hearing in Anne Arundel County Circuit Court. “We got everything we asked for.”

But lawyers for Brown, Ulman and the state elections administrator, all of whom were named as defendants, continued to characterize Clements’s lawsuit as a political stunt that never had any merit. And the judge who heard motions in the case Wednesday indicated that the lawsuit would not likely have succeeded had it been pursued further.

Judge William C. Mulford II wrote in an opinion that the defendants had a “substantial probability of success” of getting the lawsuit dismissed based on motions filed with the court that argued it was flawed in several respects.

Mulford also denied a motion by Clements to have the court sanction Brown and Ulman for not disclosing earlier that Ulman did not intend to raise money. Defense lawyers argued that if anyone should be sanctioned, it was Clements for bringing a frivolous lawsuit.

At issue was a ruling by the State Board of Elections in December that Ulman could raise money during the session, which began in January. Clements argued the ruling badly misinterpreted the law, a position that Gansler, the state’s attorney general, has also voiced.

Maryland law prohibits lawmakers and statewide officials — including Brown and Gansler — from collecting campaign contributions during annual legislative sessions. Even though Ulman is a county official, Clements argued he is covered by the ban because of his close coordination with Brown, his running mate.

Prior to the legislative session, an aide to Ulman indicated that Ulman planned to raise money during the session as allowed by law. In subsequent weeks, prior to writing the letter to The Post, Brown and his aides continued to say it was an option.

In a brief to the court, Ulman’s lawyer, Timothy F. Maloney, wrote that Clements had not demonstrated anything Ulman had done that merited sanctions.

“The only argument Plaintiffs make is that it would have saved them the time and trouble of filing this unwarranted lawsuit had Ulman announced earlier that he was not going to fundraise during the legislative session,” Maloney wrote. “Ulman, however, is under no legal obligation to relieve the Plaintiffs from their own self-created legal befuddlement.”

Andrew D. Levy, a lawyer for the state elections board, said the lawsuit was “a political gimmick” and that the board stands behind its December ruling.