Texas Attorney General Ken Paxton raised more than $18 million for his U.S. Senate campaign from July through September, more than doubling his second-quarter haul as Republicans ramp up spending in the competitive race against Democrat James Talarico.

His campaign said more than 160,000 unique donors contributed to the effort.

The surge comes as Paxton enters the final stretch of the campaign with Republicans pouring substantial resources into the race. His campaign recently launched a $20 million statewide advertising campaign, its first major general-election media buy.

Talarico has raised substantially more in the first two quarters of the year, bringing in $27 million in the first quarter and $30 million in the second. His third-quarter total has not yet been released and is due to the Federal Election Commission by Oct. 15.

Talarico’s fundraising advantage has translated into significantly more campaign advertising. His campaign has spent nearly $67 million on general-election advertising, compared with about $20 million by Paxton’s campaign, according to ad-tracking data cited by The Texas Tribune.

Republican outside groups, however, have moved aggressively to close the gap. GOP organizations spent about $122 million on advertising supporting Paxton during September alone and had reserved another $66 million in advertising through Election Day, according to AdImpact data cited by The Texas Tribune.

Paxton’s campaign said the fundraising surge gives it additional resources to make its case against Talarico to voters.

“Ken Paxton just doubled his second-quarter fundraising record to $18 million, and he did it with over 160,000 unique donors,” senior campaign adviser Nick Maddux said.

The race has attracted national attention because Democrats are attempting to win a statewide Texas election for the first time in more than three decades. Recent polling has shown a close contest, with a Fox News survey of 881 likely voters conducted Sept. 24-28 putting Talarico ahead of Paxton 51%-49%, within the poll’s ±3 percentage-point margin of sampling error.

Paxton, who was endorsed by President Donald Trump during the Republican primary, has sought to frame the race as a choice between his conservative record and Talarico’s positions.

The Republican’s record-setting third-quarter haul marks a significant increase in his fundraising pace, while Talarico’s eventual third-quarter filing will provide a clearer picture of the candidates’ financial positions heading into the final weeks of the campaign.