FORT LAUDERDALE, Fla. (AP) — A sham candidate for the Florida Legislature pleaded guilty Tuesday to being part of a vote siphoning scheme in last year's election and will testify against a former Republican state senator who prosecutors say ran it.

Alex Rodríguez agreed to testify against former Sen. Frank Artiles after pleading guilty in Miami-Dade County to accepting illegal campaign donations and lying on campaign documents. He will receive three years probation if he cooperates, including a year of house arrest. He had faced a possible 20-year prison sentence.

Prosecutors charged Artiles in March with felony campaign fraud charges, saying he secretly gave more than $44,000 to Rodriguez so that he could run in the 2020 election to confuse voters and siphon ballots from then-Democratic incumbent, Sen. Jose Javier Rodríguez. The funds allegedly came from a dark money source. Artiles has pleaded not guilty.

Alex Rodríguez, a 55-year-old auto parts salesman with no political experience, ran as an independent in the three-way race in Miami-Dade County, pulling in 6,000 votes. The race was won by Republican Ileana García by just 32 votes. She is not implicated in the scheme.

“I am deeply sorry for my actions and I want to apologize to my family, my loved ones and my friends,” Alex Rodríguez tearfully told the court, according to news outlets. “I would like to publicly offer a sincere apology to the residents of Florida District Senate 37 including Sen. Jose Javier Rodríguez, the people of Miami-Dade County and the state of Florida, and anyone else who was affected by my actions.”

Miami-Dade State Attorney Katherine Fernández Rundle said in a statement that the guilty plea “is an important step in the effort to restore honesty to Florida’s election process, which has been tarnished too long by almost invisible, independent and write-in candidates.”

Artiles' attorney, Frank Quintero, said Tuesday that his client denies doing anything illegal. He accused investigators of trying to secretly use Rodriguez as an “agent for the state” against Artiles.

“We are looking forward to deposing him,” Quintero said.

A Miami Police Department investigator’s affidavit details multiple discussions about money between Artiles and Alex Rodríguez, starting with a discussion about why Rodríguez should file to run in the state Senate race.

“Rodríguez would run as an independent with the same last name as the incumbent candidate (Jose Javier Rodríguez) in an attempt to confuse voters and siphon votes from the incumbent,” the affidavit says.

But Alex Rodríguez had money troubles, so he came up with various requests to obtain cash from Artiles, according to the affidavit. At one point, Rodríguez said he could get a used Range Rover for Artiles for $10,900, and Artiles agreed.

“It should be noted that the Range Rover did not actually exist. It was a fiction created by Rodríguez to get more of the money that he felt he was owed,” the affidavit says.

Artiles, who represented a Miami-area district, is no stranger to controversy.

In 2017, he resigned from the Senate after using racial slurs in a conversation with two Black legislators in a Tallahassee bar. Then it was revealed that Artiles used money from his political committee to hire a former Playboy model and Hooters girl as a consultant.

Before that, Artiles, a Cuban-American, served three terms in the state House from a Miami-Dade district. He was then elected to the Senate before his resignation. He also served in the Marine Corps.