PHOENIX — Saying he’s had enough, the state Senate’s No. 2 Republican is calling it quits.

John McComish, who represents the Ahwatukee section of Phoenix and parts of Tempe, Chandler and Mesa, will run for justice of the peace instead. He said that job will provide him with more regular hours than the 10 years he has spent in the Legislature.

But McComish also acknowledged he has been battered by the tea-party elements of his own party, most recently for his decision to support Gov. Jan Brewer’s bid to expand the state’s Medicaid program using funds from the Affordable Care Act.

He said that group has taken control of the party apparatus in Arizona, as evidenced by this weekend’s decision by GOP precinct committee workers to condemn U.S. Sen. John McCain for not hewing to party principles.

“Some of the far-right activists, if you will, they’re the ones who get out and work and they run for PC,’’ he said. “They’re reaping those rewards.’’

That wing of the party is trying to oust him in the August primary, possibly running Tom Morrissey, the former chairman of the Arizona Republican Party, as an alternative.

McComish said he believes he would win a primary fight because, despite the move to the right of some party workers, they do not reflect his constituents.

“I think the pragmatic Republicans, if that’s a good term, are clearly in the majority in the district,” he said.

McComish backs state Rep. Jeff Dial, R-Chandler, to replace him in the Senate. But Morrissey said he considers Dial, who also supported Medicaid expansion, of the same political stripe and intends to stay in the race. “I think it’s time we got somebody with a spine in there,” Morrissey said.