Sen. Ted Cruz drops out of the race for the 2016 Republican presidential nomination in Indianapolis, May 3, 2016. Chris Bergin/Reuters

In the two months before his campaign-ending loss in the Indiana primary, Republican presidential candidate Ted Cruz received nearly a half-million dollars’ worth of free publicity from the news media, according to the latest numbers from the research firm mediaQuant.

The media coverage Cruz received through April and March was found to be worth roughly $464 million, slightly more than the $425 million in free media that Democratic front-runner Hillary Clinton garnered over the same period. That still put Cruz in a distant second place behind Donald Trump, who raked in free publicity valued at $888 million.

For most of the past year, the Texas senator trailed both Trump and Clinton in media coverage, but he received a boost in the last two months of his campaign as it became apparent he was the only Republican who stood even a distant shot at denying Trump the nomination. Despite the additional media attention, Cruz floundered in the Indiana primary earlier this week and withdrew from the race shortly afterward.

Trump, who was anointed the Republican Party’s presumptive nominee Tuesday shortly after Cruz surrendered, has consistently attracted far more press coverage than any other presidential candidate. By comparing federal campaign finance disclosures for the month of March to mediaQuant’s analysis, International Business Times found that Trump received approximately $36 in free media that month for every dollar in campaign expenditures. (Presidential campaigns have not yet filed their disclosure forms for April.)

No other candidate even came close. Over the same period, Cruz collected $18.84 in publicity for every dollar in campaign expenditures. Clinton received about $6.67 in free media for each dollar her campaign spent.

Throughout the election season, Democratic candidate Bernie Sanders has often struggled to attract media coverage commensurate with the other major candidates. March was no exception. Over that period, his campaign received $3.53 in free media coverage for every dollar spent. He was outperformed by even third-place Republican John Kasich, who in March received $6.06 in media per dollar spent. Kasich dropped out of the Republican primary shortly after Cruz.