U.S. Sen. Ted Cruz's presidential campaign was assured the much-touted data firm it used during the 2016 race, Cambridge Analytica, was operating above board, Cruz said Tuesday, weighing in as the company faced growing scrutiny over its practices.

Cruz's data-driven 2016 campaign relied on Cambridge Analytica for over $5.8 million in services, according to Federal Election Commission records, before the firm went on to work for the Republican Party's nominee, now President Donald Trump. On Friday, Facebook announced it was suspending Cambridge Analytica from the social network ahead of reports that it had improperly harvested information from the profiles of over 50 million users. The firm has denied any wrongdoing.

"Cambridge Analytica was an outside vendor that the campaign hired to assist in data analysis and online advertising, and they worked for the campaign, pursuant to contract," Cruz told The Texas Tribune. "Cambridge Analytica represented to the campaign that all data in their possession were legally obtained and that they were in compliance with all applicable laws and regulations, and the campaign relied on those representations."

Cruz's comment echoed a statement that his spokeswoman Catherine Frazier offered hours earlier regarding the firm's role in the senator's 2016 campaign. The statement referenced "explicit contractual language" in which Cambridge Analytica agreed to operate properly, an agreement that the firm reiterated "upon inquires of the media back in 2015, when they assured us the claims made in the press were false."

As controversy has mounted over the firm's practices in recent days, Democrats have sought to make Cruz answer for its starring role in his White House bid. The Texas Democratic Party issued a statement Monday afternoon saying Cruz "will stop at nothing to weasel his way into power, even if it means weaponizing stolen information to manipulate people to like him." And on Monday night, Cruz's Democratic opponent in the upcoming midterm elections, U.S. Rep. Beto O'Rourke of El Paso, got in on the action, tweeting a dig at Cambridge Analytica's claims of sophisticated voter targeting.

"We also wanted to know what was on Texans' minds," O'Rourke said. "So we've been showing up and asking them in person at hundreds of town halls across the state."

In suspending Cambridge Analytica, Facebook said it learned in 2015 that the firm improperly obtained data from about 270,000 users through a third party and subsequently asked the firm to delete the data. While Cambridge Analytica assured Facebook it had erased the data, the social network said it discovered in recent days that the firm may not have done that.

The story has since grown only more complicated, with the publication over the weekend of newspaper investigations revealing how the firm harvested private information from 50 million profiles without users’ permission. On Monday, a London TV station unveiled an undercover investigation in which Cambridge Analytica CEO Alexander Nix was secretly filmed discussing how the firm could entrap politicians through bribes and sex workers.

Cambridge Analytica had factored prominently into many accounts of Cruz’s data-savvy 2016 operation. At the time, the firm was a little-known company that boasted of being able to use “psychographic” analysis of voters to narrowly tailor messages that could win them over.

"The campaign hired Cambridge Analytica as a vendor to assist with data analysis and online advertising,” Frazier said in the statement. "The campaign’s data analysis program followed and built upon the successful data-modeling and micro-targeting approach pioneered by the Obama campaigns in 2008 and 2012.”

Cambridge Analytica is reportedly owned in part by Robert Mercer, a New York hedge-fund magnate who poured $11 million into a super PAC network that supported Cruz’s 2016 effort. In addition to the more than $5.8 million that the firm billed Cruz’s campaign, it did $570,000 in business with one of the pro-Cruz super PACs, Keep the Promise II.

Mercer and his daughter Rebekah — who helps guide his political spending — ultimately switched their alliances to Trump when Cruz dropped out of the presidential race.

Even then, Cambridge Analytica maintained a strong connection to Texas — it was part of the Trump campaign’s San Antonio-based digital operation operation, which was helmed by then-local web developer Brad Parscale.