Get ready: With less then four weeks until Maryland’s Democratic primary, gubernatorial hopefuls are expected to quickly blow through millions of dollars in a frenzied attempt to connect with as many voters as possible.

That will mean a barrage of television ads, mail targeted to certain voters, phone calls from campaign volunteers and social media postings. The candidates are spending a lot of time trying to raise even more money to reach even more voters before the June 24 primary.

In the money race, Lt. Gov. Anthony Brown is leading with $4.15 million in the bank, having raised $1.24 million in the past six weeks — about four times as much as his closest competitor, Attorney General Douglas F. Gansler. Tuesday at midnight was the deadline for candidates to report how much money they have raised thus far and how much they have spent. It was the first such deadline since January.

“This is all about voter contact, about being able to knock on more doors, to make more phone calls, to be on television and radio a few more times a day,” said Brown campaign manager Justin Schall.

Brown’s bottom line got a big boost from a fundraiser this month featuring former president Bill Clinton, which Brown aides said brought in close to $1 million. Gansler said that he and his running mate, Del. Jolene Ivey (Prince George’s), raised about $312,000 and had $3.11 million in the bank as of a week ago. Minus Brown’s fundraiser with Clinton, Gansler took in more donations, his campaign pointed out.

“Doug has continued to raise money from supporters at a steady clip in the last six weeks, and with more than $3 million in the bank and less than a month before the primary, we have the resources needed to win this race,” said Katie Hill, Gansler’s communications director.

But some analysts said the disparity in fundraising between Brown and Gansler reflects a disparity in the polls and suggests that Gansler may be encountering resistance from potential donors who doubt his ability to prevail in the primary.

“It tells me that the folks that give money have already picked a winner,” Donald F. Norris, chairman of the department of public policy at the University of Maryland Baltimore County.

Neither Brown nor Gansler reported raising money during the 90-day legislative session, which ran from early January to early April. A third Democrat in the race, Del. Heather R. Mizeur (Montgomery), was allowed to raise money during the session because of an exception in the public-financing law.

Mizeur reports having about $1 million on hand, including matching funds for which she has qualified by participating in the state’s public financing system. That’s enough money for her campaign to start buying television ads, something her two rivals have been doing for months.

Brown reported spending $2.75 million on media during the reporting period, the majority of which went to produce and air television ads. Gansler reported spending $2.6 million.

“We don’t need as much money as the other campaigns,” said Steven Hershkowitz, a Mizeur campaign spokesman. “All we need is the amount of money that’s needed to get Heather’s message out about rebuilding the middle class. . . . We’ll have the resources to do that.”

To save money, Mizeur’s campaign often distributes simple printouts of campaign information rather than the glossy brochures used by her rivals. She has relied heavily on a grass-roots network of supporters who use free social-media platforms such as Twitter, YouTube and Facebook to spread her message.

“A vast majority of voters are undecided, so a lot of this is going to come down to — I hate that this makes a difference — name recognition. Money makes a difference,” said Tim Magrath, executive director of the J. Glenn Beall Institute for Public Affairs at Frostburg State University. “It comes down to who has the best ground game and who can contact the most voters.”

Although the Democratic gubernatorial hopefuls have received the most attention in a state where Democratic voters greatly outnumber Republicans, four GOP candidates are also sprinting toward the primary, albeit with much less cash.

Anne Arundel County businessman Larry Hogan is in the strongest financial position, having raised more than $1 million since January, according to reports filed Tuesday. But about half of that is money he loaned himself. Hogan reported having nearly $390,000 in the bank as of last week. His campaign expects to receive $275,000 in matching funds next week as part of its participation in the state’s public financing system.

Harford County Executive David R. Craig reported having $144,058 in the bank. Like Hogan, Craig intends to participate in the state’s public financing system, but so far he has not raised enough money to qualify.

Del. Ronald A. George (Anne Arundel) missed the filing deadline Tuesday night because of what his campaign said were technical problems. His campaign said he has about $40,000 cash on hand and had raised $69,000 since the end of the legislative session in April.

Charles County businessman Charles Lollar continues to run his campaign on a shoestring budget and had about $18,000 in the bank as of last week, according to his report. Lollar might not be allowed to spend that money, as a judge recently ruled that the campaign owes a political database software vendor in Northern Virginia more than $20,000.

In the race for the Democratic Party nomination for attorney general, state Sen. Brian E. Frosh (Montgomery) raised slightly less than the less-experienced front-runner, Del. Jon S. Cardin (Baltimore County), according to their campaign filings. But Frosh has $864,000 in the bank, considerably more than Cardin, who has $486,000 cash on hand. Del. Aisha N. Braveboy (Prince George's), the third primary candidate, is a distant third, having raised $29,000 during the reporting period and reporting $69,000 in the bank.

Arelis Hernández contributed to this report.