© Maddie McGarvey for The New York Times Representative Tulsi Gabbard has been urging her supporters to take part in polls that could help her meet the qualification threshold.

With the deadline to qualify for the next Democratic presidential debates looming just two weeks away, candidates on the bubble are mounting some of their final offensives, urgently seeking supporters who can help them make the cut.

Sign Up For the Morning Briefing Newsletter

Senator Kirsten Gillibrand of New York has poured more than $1 million into advertising in Iowa and New Hampshire. Julián Castro, the former housing secretary, bought a local ad in Bedminster, N.J., where President Trump is vacationing this week. And Representative Tulsi Gabbard of Hawaii has urged her supporters to try to improve their chances of being selected for online polls.

They and other lower-tier candidates are desperately searching for voters who can propel them to 2 percent support in qualifying polls, one of the Democratic National Committee’s requirements for the next set of debates, scheduled for Sept. 12 and 13 in Houston. The threshold for the June and July debates was merely 1 percent.

[Andrew Yang became the ninth Democrat to qualify for the September debates.]

Meanwhile, Tom Steyer, the former hedge fund investor turned impeachment activist, has spent millions of dollars flooding the internet with ads that have helped him catch up to his rivals after entering the race in July. On Tuesday his campaign announced that he had crossed the other threshold for qualification by collecting donations from more than 130,000 people.

The collective scramble to earn a spot on the stage next month underscores the importance the campaigns are placing on the next debates. Those who secure a lectern will have another opportunity to speak to a national audience, but those who miss out will face louder calls to withdraw as Democrats grow anxious for the field to narrow.

“This is the brave new world of D.N.C. debate qualification standards,” said Jim Hobart, a partner at Public Opinion Strategies, a Republican polling firm. “Democratic presidential candidates are clearly going to do whatever they can to qualify for these debates, whether that’s spending millions of dollars on television ads or encouraging donors to sign up for these online polls.”

A New York Times analysis of polling and donation data shows that nine of the 24 Democratic candidates have already qualified for the next debates by collecting donations from at least 130,000 people and reaching 2 percent support in four qualifying polls. The deadline to meet those standards is Aug. 28.

Mr. Castro, Ms. Gabbard, Ms. Gillibrand and Mr. Steyer are all within striking distance. Mr. Castro and Mr. Steyer need only one more qualifying poll; Ms. Gabbard needs three more; and Ms. Gillibrand needs about 30,000 more donors as well as three more qualifying polls.

© Maddie McGarvey for The New York Times Senator Kirsten Gillibrand began an advertising campaign in Iowa and New Hampshire over the weekend. None of the other candidates except former Gov. John Hickenlooper of Colorado have hit 2 percent in any qualifying polls, and Mr. Hickenlooper had only about 14,000 individual donors as of June 30. The Times reported this week that he was considering dropping out of the race.

[These three cities are key for 2020 Democrats. They’re not in Iowa or New Hampshire.]

The campaigns are not necessarily seeing a return on their investment as they hunt for new donors; many are asking for $1 contributions. But the size of the donations does not matter for debate qualification, only the number of individual contributors. That has skewed campaigns’ strategies and encouraged them to create advertising they hope will go viral.

Mr. Castro’s new advertisement is set to appear Wednesday on Fox News in Bedminster, where Mr. Trump is staying at his golf course. In the ad, Mr. Castro speaks directly to the president, ticking off Mr. Trump’s words and actions that he says “stoked the fire of racists" and inspired the mass shooting that killed 22 people in El Paso this month.

“Innocent people were shot down because they look different from you. Because they look like me. They look like my family,” Mr. Castro says in the ad. “Words have consequences.”

Mr. Castro’s campaign said it spent $2,775 to run the ad a few times on Wednesday. His team said the ad was meant to send a message to Mr. Trump, who watches Fox News regularly, but campaign officials also expected it would resonate with voters.

Ms. Gillibrand’s new 30-second ad, titled “Imagine,” paints her as “a leader driven by compassion, brave enough to take on the impossible, who looks beyond herself to do what’s best for us.” Her campaign said the ad spending was intended in part to “bolster the campaign’s efforts to qualify for the fall debates.”

A guide to the 24 Democratic contenders who want to face Trump

Ms. Gillibrand’s campaign had more than $8 million on hand at the end of June, and her aides have said that the 24 hours after the July debate were her strongest of the campaign in terms of bringing in new online donors and contributions.

She has spent heavily since then. Over the past month, her campaign spent $1 million on Facebook ads, according to data from the company, second only to Mr. Steyer’s campaign during that period.

Mr. Steyer’s team has said he plans to spend at least $100 million on the race. His campaign has already spent about $3 million advertising on Facebook and $820,000 on Google, according to data from those companies.

© Erin Schaff/The New York Times Tom Steyer, the former hedge fund investor, has spent millions of dollars flooding the internet with ads. In the seven-day period ending on Sunday, he spent $1.1 million on Facebook, roughly five times as much as the second highest-spending Democratic candidate in that period, Mayor Pete Buttigieg of South Bend, Ind. On Sunday alone, Mr. Steyer spent about $140,000 on Facebook — more than what many candidates, including Senator Kamala Harris of California and former Representative Beto O’Rourke of Texas, spent on the platform in the past month.

Mr. Steyer has also spent about $6.5 million on television advertising since he hit the trail, according to Medium Buying, a Republican media buying agency.

A spokesman for Mr. Steyer’s campaign declined to comment on its spending and the amount of money it had raised in contributions. But other campaigns took note that Mr. Steyer had reached the donor threshold so quickly.

“The D.N.C. donor requirement may have been added with the right intentions, but there’s no doubt that it’s created a situation in which billionaires can buy their way onto the debate stage,” Gov. Steve Bullock of Montana said in a statement on Tuesday. “We’re kidding ourselves if we’re calling a $10 million purchase of 130,000 donors a demonstration of grass-roots support.”

Ms. Gabbard — who left the campaign trail this week to report for a two-week training exercise with the National Guard — is in need of better polling results. In an effort to improve those prospects, her team sent an email to supporters this month imploring them to “take the time to answer if you receive a call from a pollster or are presented with an online poll.”

The email also listed “ways you can increase your chances of being selected for a debate-qualifying poll.” It encouraged supporters to fill out surveys from the online polling firms Survey Monkey and YouGov in an effort to be selected for their presidential primary polls.

Doug Rivers, YouGov’s chief scientist, said in an email that he and his team were aware of messages like the one sent by the Gabbard campaign. But he said the company’s systems made it extremely unlikely that a newly registered respondent would be surveyed in a qualifying poll. Even then, he said, there would be too few new panelists to skew the results.

A spokeswoman for Survey Monkey said it randomly selects its respondents and prevents those selected from responding multiple times.

Thomas Kaplan contributed reporting.