Phoenix Mayor Greg Stanton, an anti-Trump Democrat who has held the post in Arizona's capital city for more than six years, stepped down Tuesday to focus on a run for Congress.

Stanton first announced in October that he intended to run for the U.S. House seat currently occupied by departing Democratic Rep. Kyrsten Sinema, who is seeking the U.S. Senate seat of retiring Republican Jeff Flake.

Under Arizona's "resign to run" law, Stanton had to resign from the mayorship by the end of May in order to maintain his federal candidacy.

Wednesday is the filing deadline for the race in Arizona's 9th Congressional District, which is centered in Tempe and includes parts of nearby communities, including Phoenix. The primaries are scheduled for Aug. 28, and the general election will be Nov. 6.

Stanton is expected to face at least two other Democrats, while as many as five Republicans are expected to run. Independent candidates and those representing smaller parties also will run.

Democrat Stanton has long criticized President Donald Trump, and has cited his opposition to Republican leadership in Washington as one of the key reasons for his run.

PHOENIX MAYOR NOT HAPPY ABOUT TRUMP RALLY

"Arizonans deserve better than what we're getting from Washington, and there has never been a more consequential time in the fight to protect the middle class," Stanton said in October. "In Congress, I'll continue to do what we've done in Phoenix --deliver real results that improve people's lives."

In August, Stanton criticized Trump for announcing a rally in Phoenix just a day after the president blamed "both sides" for weekend violence in Charlottesville, Va., between white supremacists and counter-demonstrators.

"I am disappointed that President Trump has chosen to hold a campaign rally as our nation is still healing from the tragic events in Charlottesville," Stanton said in a statement at the time. "It is my hope that more sound judgment prevails and that he delays his visit."

Thelda Williams, who was the vice mayor, is now serving as Phoenix's mayor. She is expected to retain the post after a City Council vote in June, and would be up for election in November.