The process leading up to former Maricopa County Sheriff Joe Arpaio's contempt of court conviction and eventual pardon -- courtesy of President Trump -- had plenty of stops along the way.

Arpaio had been sheriff for 15 years before the case even began, but in many ways it defined the second half of his career in charge of Maricopa County's law enforcement.

2007: The Melendres case begins, alleging Arpaio's deputies discriminated against Latino drivers during traffic stops.

2010: The Justice Department files suit against Arpaio for refusing to cooperate with the investigation in the Melendres case.

2011: Federal Judge Murray Snow orders Arpaio to stop racially profiling Latinos.

2013: Snow rules that Arpaio violated Latino drivers' rights by racially profiling them in response to an ACLU class-action case.

2016: Arpaio endorses Donald Trump for president and becomes a frequent figure on Trump's campaign rally circuit.

June 2016: Arpaio's criminal contempt trial begins in Phoenix.

November 2016: Trump wins the presidency; Arpaio loses the sheriff's race to challenger Paul Penzone.

July 2017: Federal Judge Susan Bolton finds Arpaio guilty of criminal contempt for ignoring Snow's order that barred him and MCSO from racially profiling Latinos in an effort to arrest undocumented immigrants. He could face up to six months in jail.

August 2017: Trump announces a pardon for Arpaio before sentencing, saying Arpaio's life's work was "protecting the public from the scourges of crime and illegal immigration."

The following week, Arpaio's attorneys file a motion to vacate the guilty verdict against him, since the presidential pardon only waives the punishment, not the verdict.

September 2017: Prosecutors ask Bolton to dismiss the criminal contempt case entirely, saying Trump's pardon effectively ended the case.