PHOENIX — Gov. Doug Ducey on Wednesday appointed Maricopa County Attorney Bill Montgomery to the Arizona Supreme Court over fierce opposition from civil rights advocates and criminal justice reformers.

Ducey picked his political ally and fellow Republican from a list of seven finalists, elevating a controversial prosecutor to a role where he'll help shape life in Arizona through the court's interpretation of state laws, including business regulations, election rules and criminal codes.

Montgomery is Ducey's fifth appointment to the seven-justice court, which now consists only of Republicans. He replaces Democrat Scott Bales, who retired on Aug. 1.

"Bill's record, resume and extensive list of supporters speak to his qualifications and his broad support in the community," Ducey said in a statement. "On the Court, Bill will be a strong defender of the Constitution and the rule of law. He will serve with honor and dedication, just as he has throughout his entire career."

Montgomery drew fervent support from fellow Republicans, who said he has shown courage making difficult decisions as the top prosecutor in the nation's fourth-most populous county. They praised his background rising from a hardscrabble Southern California neighborhood to a West Point graduate who led soldiers in the first Iraq war.

He was elected as metro Phoenix's top county prosecutor in 2010, succeeding a prosecutor who had teamed up with then-Sheriff Joe Arpaio to criminally investigate officials who were at odds with them in political and legal disputes. The discredited investigations later resulted in the disbarment of the prosecutor who led them.

Montgomery is credited with moving beyond the divisive era. But he also drew criticism for carrying out prosecutions of Arpaio investigations of immigrants suspected of being in the country illegally. He was a forceful advocate of a voter-approved law that required immigrants to be denied bail for certain offenses, before it was thrown out by the courts.

His office also handled the 2015 freeway shootings case that ended with the dismissal of charges against the only person arrested in the attacks.

Montgomery's critics say he has been hostile to the rights of lesbian, gay, bisexual and transgender people and a barrier to efforts to reform criminal sentences, which have gained traction in other states. Montgomery and other elected prosecutors hold considerable sway over Republicans in the Arizona Legislature. The American Civil Liberties Union protested at Montgomery's office in July, demanding he withdraw from consideration for the Supreme Court seat over criminal justice reform.

Montgomery also came under fire for his handling of sexual misconduct allegations against a prominent prosecutor in his office, who is the subject of disciplinary proceedings.

Montgomery was picked as a finalist by the Commission on Appellate Court Appointments, a citizen panel that interviews potential judges and forwards a short list to the governor for appointment in a system designed to limit partisanship in the judiciary. After his interview, Commissioner Larry Suciu said Montgomery lacked experience in appellate law and suggested he embellished his involvement in the handful of appellate matters cited on his application.

Rachel Mitchell, who is the chief deputy within the prosecutor's office, will run the agency until officials pick an interim county attorney to complete Montgomery's term, which ends in January 2021.

Mitchell is known for questioning Christine Blasey Ford a year ago about her sexual assault allegation against then-Supreme Court nominee Brett Kavanaugh.