A vulnerable Republican senator said Wednesday that he'll write in Colin Powell when he votes in November because he doesn't support Donald Trump and Hillary Clinton supports the Iran nuclear deal.

The problem is, Powell supports the deal as well.

Sen. Mark Kirk, R-Ill., told CNN Wednesday afternoon that he will not endorse Clinton because she "was for the Iran agreement and I can't support for the Iran agreement."

Instead, Kirk will write in Powell, who he said "will be the best person."

Kirk said writing in Powell, who served as secretary of state under former President George W. Bush, is not actually going to help Clinton.

"I would say it is a vote not for Hillary Clinton. … We should not have such a person with so many conflicts of interest in office as our president of the United States," Kirk explained.

Last year, Powell told NBC News last fall that the Iran deal is a "pretty good deal."

Kirk is facing a tough reelection battle against Rep. Tammy Duckworth, D-Ill. In June, Kirk unendorsed Trump, saying that he "cannot and will not" support his party's nominee in Trump.