Sen. Ted Cruz, R-Texas, raised more than $5 million in two weeks for his re-election campaign, bringing his total to more than $40 million.

According to the campaign, Cruz garnered $5,317,488 in two weeks, which will be included in a report due later Thursday that examines donations from the first half of the month. Altogether, Cruz has raised $40,454,077 for his campaign.

The announcement comes after Cruz’s challenger Rep. Beto O’Rourke, D-Texas, set a new fundraising record, announcing earlier this month that he had raised $38.1 million in the third quarter. O’Rourke, who does not accept donations from political action committees, said the sum was a result of 802,836 individual donations.

The previous fundraising record earned by a Senate candidate in a quarter was when GOP candidate Rick Lazio raked in $22 million in his race against Hillary Clinton for a New York Senate seat in 2000.

Cruz and O’Rourke are set to face each other in the 2018 midterm election on Nov. 6.