Editor's note: This story has been updated with comments from U.S. Sen. Ted Cruz.

U.S. Rep. Beto O'Rourke, D-El Paso, raised $38.1 million for his U.S. Senate campaign in the third quarter, a new record for the largest fundraising quarter ever in a U.S. Senate race, according to his campaign.

The haul more than tripled Republican incumbent Ted Cruz's fundraising for the past three months, which Cruz has said was over $12 million. O'Rourke has consistently raised more than Cruz in the race, but this is the widest gap yet. The $38.1 million is by far the largest amount raised in a quarter by a Senate candidate, surpassing Republican Rick Lazio's record of $22 million in 2000 for his bid against Democrat Hillary Clinton in New York.

O'Rourke's campaign said the $38.1 million came from 802,836 individual contributions, and a majority of it came from Texas.

"The people of Texas in all 254 counties are proving that when we reject PACs and come together not as Republicans or Democrats but as Texans and Americans, there’s no stopping us," O'Rourke said in a statement. "This is a historic campaign of people: all people, all the time, everywhere, every single day — that’s how we’re going to win this election and do something incredible for Texas and our country at this critical moment."

The candidates have until Monday to report their full third-quarter finances to the Federal Election Commission. Cruz announced his $12 million haul last week, his largest quarter of the race — and a record for a Senate contest in Texas, he said.

But O'Rourke had long been expected to soar to new heights with his third-quarter fundraising, raising over $6 million online alone during the last several days of September. In the second quarter, he more than doubled Cruz's fundraising, $10.4 million to $4.6 million.

Cruz brought up O'Rourke's $38 million total during a rally Friday afternoon in Houston, warning "that kind of cash flooding into Texas is dangerous" — and continuing to press his case that O'Rourke is being funded by angry liberals throughout the nation.

"Every left-wing radical in the country wants to turn Texas blue," Cruz said, "and they are sending their money to Comrade Beto."

Neither campaign has disclosed how much cash on hand it has with less than a month until Election Day. O'Rourke had the advantage in that category at the end of June, with $14 million in the bank to Cruz's $10.4 million.

In discussing fundraising numbers, Cruz and his campaign usually take into account three groups: his re-election campaign, a leadership PAC and a joint fundraising committee benefitting the re-election campaign and leadership PAC. Cruz is also benefitting from spending by a number of outside groups that have pumped more than $5 million into the race, most of it to attack O'Rourke.

Andrew Eversden contributed reporting.