Democratic presidential candidate Julián Castro announced Friday morning he hit his self-imposed $800,000 fundraising goal, giving him the resources he says he needs to keep his campaign alive — and to try to qualify for the next two debates.

The announcement came after a rush to raise money that began Oct. 21. Days after his latest fundraising report showed he had less than $700,000 in the bank, Castro sent a plea to supporters asking them to help him raise the money by midnight Halloween, or he’d drop his White House bid.

“Time and time again this campaign has defied expectations with the support of an army of dedicated, grassroots supporters,” campaign manager Maya Rupert said in a statement. “We set an extremely ambitious goal to keep Secretary Castro’s voice in this race, and our supporters met the challenge and delivered one of the best months of the campaign to date.”

The campaign said it received more than $1 million during the month of October from nearly 50,000 donors and had the best fundraising day of the campaign since August on Thursday. With the money solidified, Castro’s campaign said it plans to make a push for the November and December Democratic primary debates — a lofty goal for a campaign that has been mired in low single digits in polls since entering the race in January.

The Texas Tribune thanks its sponsors. Become one.

In a final fundraising push Thursday night, Castro’s national political director, Natalie Montelongo, told supporters they were less than $20,000 away from hitting their goal.

“He didn’t have millions of dollars to start off with. He also didn’t have a massive email list and didn’t have the name ID that most of the frontrunners have,” Montelongo said. “From the beginning, this campaign has been fueled by a grassroots movement.”

Rupert also expressed confidence in making the debate stage despite the odds stacked against the campaign.

“We’re going to make sure the issues that he’s the only one to talk about don’t get shut out of a presidential debate stage,” Rupert said.

Castro, the former U.S. housing secretary and San Antonio mayor, is not the first presidential candidate to present a do-or-die target for remaining in the race. Rival Cory Booker implied in late September he would drop out of the race if he did not raise $1.7 million in 10 days — a goal he hit.

Despite reaching his $800,000 fundraising goal, Castro is far from satisfying the requirements for the fifth debate, which is Nov. 20 in Georgia. Party rules say that to qualify, a candidate must have 165,000 unique donors and receive 3% in four polls (up from 2% for the fall debates). While Castro has accrued the donors needed to make the stage, he has no qualifying polls under his belt. The deadline to qualify for the next debate is Nov. 13.

The Democrat will return to Iowa this evening to discuss affordable housing after a tour of a long-term housing facility, speak at the Liberty and Justice Celebration, and join a town hall hosted by the NAACP of Des Moines. Fellow Texan Beto O’Rourke will be in Iowa this weekend, too.

“We’re not going anywhere,” Rupert said in a statement. “Julián will keep being a voice for the voiceless, and a champion for the Americans who have been left behind. We will keep lifting up important issues others choose to ignore, and demonstrating by example why Secretary Castro is the best candidate to take on Donald Trump.”