During four-plus hours in court Wednesday, former Maricopa County sheriff Joe Arpaio struggled to explain why he recommended 21 felony charges against the son of a political rival, Sen. Jeff Flake.

Austin Flake and Austin's now-ex-wife, Logan Brown, are suing Arpaio in federal court for malicious prosecution -- targeting them to strike back at the Arizona senator.

Three years ago, Flake and Brown were charged after 21 dogs died under their care at a Gilbert kennel owned by Brown's parents.

Prosecutors later dropped the charges after they learned Arpaio's investigators withheld key evidence.

Maricopa County Attorney Bill Montgomery declined to file new charges against Flake and Brown in the kennel deaths, which were linked to an air-conditioning failure.

Arpaio said on the witness stand Wednesday that he was following his detectives' advice when he recommended the felony charges.

But under intense questioning by Flake attorney Stephen Montoya, the former lawman struggled to justify the charges. Here's a sample of their exchange:

Flake attorney Stephen Montoya: Can you tell the jury one fact (about the charges)?
Former Sheriff Joe Arpaio: I listen to my detectives when they say we have good evidence.
Montoya: What evidence did you have that Austin Flake intended to hurt dogs?
Arpaio: I'm saying what detectives compiled.
Montoya: Isn't it that you didn't know what you were talking about?
Arpaio: Not true.

The lawsuit alleges that Arpaio's deputies searched Austin Flake's and Logan Brown's phone records for evidence that they spoke with Sen. Flake after the dogs died.

Days after the dogs died, the suit alleges, Arpaio deputies staked out the senator's home seeking to tie him to the investigation.

Flake and Arpaio have been on opposite dies of the republican divide on illegal immigration -- Arpaio the hardliner, Flake seeking reform.

They haven't clashed publicly, beyond Flake's criticism of the "birther" movement questioning President Barack Obama's birthplace, which Arpaio championed.

Arpaio testified Wednesday that the last time he and the senator spoke was at the 2014 victory party for Gov. Doug Ducey.

Austin Flake and Logan Brown are expected to testify on Thursday.

The trial, before a jury of five women and three men, should last into next week.

Arpaio was voted out office in November 2016, after serving as sheriff for 24 years.

Maricopa County taxpayers are paying Arpaio's legal bill for this lawsuit, because it involves an allegation stemming from his conduct in office.