PHOENIX (AP) — A judge said Friday the first state lawmaker in the U.S. to be ousted over sexual misconduct allegations after the rise of the #MeToo movement can run for the Arizona Senate because he is still a resident of the district he wants to represent.

The judge ruled in a legal challenge filed by a candidate in the Aug. 28 primary claiming ex-Rep. Don Shooter does not live in the district.

Shooter previously served in the Arizona House and represented a district that includes parts of Yuma and Phoenix.

The state House voted 56-3 to expel Shooter in February after investigators concluded he sexually harassed at least seven women, including fellow lawmakers

Shooter has apologized for what he called insensitive comments involving women but said he never sought to touch anyone or have a sexual relationship.

Shooter has filed more than 800 voter signatures to qualify for the primary election ballot in the southwestern Arizona district.

In her ruling, Maricopa County Superior Court Judge Rosa Mroz found that Shooter has treated his Yuma apartment as his primary residence in the five years that he's lived there. Mroz noted that he lists the home on his driver's license and tax returns. She said he also receives mail and visitors at the residence.

Shooter testified Thursday that he still lives in the condo in Yuma and his wife lives at a house in Phoenix, where he would stay during legislative sessions and now for meetings with his attorneys.

Republican candidate Brent Backus filed the lawsuit saying Shooter couldn't run for the seat because he doesn't live in the district.

Backus' attorney Tim La Sota introduced evidence showing Shooter's voter registration had been switched to the Phoenix address for two weeks, but Shooter denied making the change.

La Sota also said the power had been shut off in Shooter's Yuma condo, and he has spent most of his time in Phoenix since the expulsion by the House.

Shooter said his wife had the electricity turned off to save money — a decision he was unaware of.

Shooter's attorney Tim Nelson said in an email that he and his client were "pleased with the ruling and believe Judge Mroz was right on the law and in her finding that Mr. Shooter is a Yuma resident."

Backus said he would respect the decision by the judge and let voters decide about Shooter.

"I feel 100 percent confident the voters will reject him," Backus said. "He has a right to run and I look forward to meeting him on the trail."

Other candidates seeking the district's Senate seat are Republican incumbent Sen. Sine Kerr, a dairy farmer who was appointed to fill the seat, Republican Royce Jenkins, and Democrat Michelle Harris.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.