CEDAR PARK — U.S. Sen. Ted Cruz, R-Texas, on Friday detailed his role in urging President Donald Trump to pardon conservative writer and filmmaker Dinesh D'Souza, saying he raised the issue with Trump while they traveled together last month in Texas.

Trump announced Thursday that he was pardoning D'Souza, who pleaded guilty in 2014 to campaign finance fraud, tweeting D'Souza was "treated very unfairly by our government!" D'Souza told media outlets afterward that Cruz told him about a month ago that he would bring up a potential pardon with the president.

Speaking with reporters after a campaign event Friday, Cruz said he made good on the promise while Trump was in Dallas on May 4 to speak at the National Rifle Association's annual meeting. Cruz met Trump at the airport and the two rode together to the conference in the presidential motorcade.

Trump had recently granted a pardon for Scooter Libby, the ex-chief of staff to former Vice President Dick Cheney who was convicted of perjury in 2007.

"He had just pardoned Scooter Libby, who I think Scooter likewise had faced an unfair prosecution," Cruz recalled. "I think that pardon was the right thing to do, and so in the car ride, I said, 'You know, Mr. President, another pardon very much along the same lines of Scooter Libby would be Dinesh D’Souza, who I think was unfairly politically targeted.' And the president agreed."

Cruz's account is at odds with what Trump and the White House have said about how the pardon came about. Trump said Thursday that "nobody asked me to do it," and a White House spokesman said later that day he was "not aware of any conversation" Trump had with Cruz on the matter. But anonymous White House officials did tell The Washington Post on Thursday that Cruz had lobbied for the pardon.

D'Souza, author of books like "The Big Lie: Exposing the Nazi Roots of the American Left," had been charged with illegally using straw donors to give to a Republican candidate for U.S. Senate in New York. He was sentenced to five years of probation, a punishment that Cruz and others critics have argued was disproportionately harsh and political revenge by the Obama administration.

While Cruz continued to heap praise on Trump on Friday for pardoning D'Souza, the senator offered much less approval for another presidential decision this week: slapping tariffs on steel and aluminum from U.S. allies Canada, Mexico and the European Union. Asked if he agreed with the tariffs, Cruz flatly said no.

"I think tariffs are a mistake. I think they hurt Texas businesses. I think they’ll hurt American businesses," Cruz said, acknowledging there is a fierce debate over trade policy within the Trump administration. "I hope the president and the administration go a different direction.”

Cruz's Democratic challenger, U.S. Rep. Beto O'Rourke of El Paso, responded critically on Twitter to Cruz's comments in Cedar Park.

"Texas could be hit harder than any other state by these kinds of tariffs," O'Rourke tweeted. "Trump’s trade policies will devastate our state, businesses, & economy. Senator Cruz should have explained that to the president while they were riding together last month."

Cruz fired back at O'Rourke while speaking with reporters before an appearance Friday night in Austin.

"I’m not surprised that Congressman O’Rourke is trying to attack. Right now, as far as I know, his only interactions with President Trump are to call for impeaching President Trump," Cruz said, alluding to O'Rourke's comment earlier this year that he has seen enough evidence that he would vote to impeach the president. "So he doesn't take the opportunity to stand up for the principles of Texas, the values of Texas."

Cruz told reporters that he has "repeatedly" raised the issue of tariffs with Trump, as recently as during the president's trip to Texas on Thursday. And during the same car ride where they discussed D'Souza, Cruz said, he and Trump also talked about the North American Free Trade Agreement.