Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Sen. John McCain said he might write in his "old, good friend" Sen. Lindsey Graham for president when he casts his ballot next month, because he can't bring himself to vote for either Donald Trump or Hillary Clinton.

McCain was asked about his shifting position on Trump's candidacy as he sparred with his Democratic challenger for Arizona's U.S. Senate seat during their first debate Monday night.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

McCain was asked why, after Trump’s many controversies and personal attacks, including on himself, he hadn't withdrawn his endorsement until this weekend when a 2005 video surfaced of Trump bragging about groping women.

Republican Sen. John McCain of Arizona talks with the two debate moderators prior to his scheduled debate against Democratic Rep. Ann Kirkpatrick Monday, Oct. 10, 2016, in Phoenix. Ross D. Franklin / AP

"When Mr. Trump attacks women and demeans the women in our nation and our society, that is a point where I just have to part company," the five-term Republican senator said. "I have daughters, I have friends, I have so many wonderful people on my staff. They cannot be degraded and demeaned in that fashion."

"It’s not pleasant for me to renounce the nominee of my party," McCain said. "He won the nomination fair and square."

His opponent, Rep. Ann Kirkpatrick, D-Ariz., seized on the opportunity to paint McCain as a hypocrite. "He’s been trying to run from Trump’s disparaging remarks for the last year while at the same time endorsing him over 60 times," she said.

Kirkpatrick also accused McCain of saying that he supported Trump having access to nuclear weapons — Democratic presidential nominee Hillary Clinton has raised doubts about Trump's mental fitness to be responsible with the nation's nuclear codes.

"I do not see a scenario where the finger would be on the button," McCain said.

Finally pushed on who he will vote for, McCain said he might write in Sen. Lindsey Graham, R-S.C.

"He’s an old, good friend of mine, and a lot of people like him," McCain said. "The fact is, seriously, I cannot vote for either one [Clinton or Trump]."