PROVIDENCE, R.I. (AP) — The planned sentencing of former House Speaker Gordon Fox on Thursday marks the end of a federal investigation that led to the downfall of a man who became admired for his rise from working-class roots to arguably the most powerful person in Rhode Island government.

U.S. District Judge Mary Lisi is due to sentence Fox after he pleaded guilty to bribery, wire fraud and filing a false tax return. Fox acknowledged he used $108,000 from his campaign account for himself and that he took a $52,500 bribe when he was a member of the Providence Board of Licenses.

Prosecutors and his lawyer agreed to ask for a three-year prison term as part of a plea agreement.

Fox, a Democrat, had been widely admired before a dramatic raid on his home and Statehouse office in March 2014. He became the nation's first openly gay House speaker in 2010 and in 2013 pushed through his signature legislation: gay marriage. He and his longtime partner, Marcus LaFond, married in Fox's Statehouse office later that year.

Fox's former colleague, Rep. Edith Ajello, said in a letter to the judge that Fox had been a "shining example" and role model to the down-at-the-heels Providence neighborhood where he grew up.

"With study, hard work and determination, a minority youth from a working class, minority neighborhood became speaker of the RI House of Representatives, many say the most powerful person in the state," Ajello wrote.

Fox, 53, is the son of an Irish-American father who worked as a jewelry polisher and a mother of Cape Verdean descent who was a maid and factory worker. With six children in the family, they struggled to make ends meet.

To help pay the bills, Fox went to work at age 16 at Carvel, a local ice cream shop, while he attended the elite Classical High School. He then began attending Providence College, but had to drop out when his father died unexpectedly. Later, he enrolled at Rhode Island College, then got his law degree at Northeastern University.

Ajello said she first met Fox when they were both running for the General Assembly in 1992, a year after he graduated from Northeastern. At the time, he still was "cheerfully scooping ice cream" at Carvel, she said. Fox won the seat representing his old neighborhood, along with a large swath of the city's wealthy East Side section.

He ultimately was elected to 11 terms from the liberal district. A day after the Statehouse raid, he stepped down as speaker but kept his seat, even appearing at the Statehouse for some votes before he was charged. He did not run for re-election.

As speaker, he was known as a canny politician who understood how to build support for a bill, and when to walk away. He disappointed many supporters when he abandoned an early attempt to legalize gay marriage, choosing instead to back civil unions.

"You have to be able to move votes," he said at the time.

Two years later, he was able to push the bill through.

As a lawyer, Fox ran a solo law practice, but according to federal prosecutors, his income from it was modest, averaging less than $73,000 per year. Despite that, he had a large house in an expensive neighborhood and drove a $50,000 Audi. Prosecutors said his mortgage payment alone was $3,800 per month and his car payment was more than $800.

They said he bought the car soon after arranging the $52,500 bribe.

His lawyer, William Murphy, blamed his crimes on money problems.

"Mr. Fox committed financial crimes because his financial life was not in order," he said. "He acknowledges that there are no excuses for his criminal behavior."