FILE: Former New York Mayor Rudy Giuliani speaks during the opening day of the Republican National Convention in Cleveland, Monday, July 18, 2016. (AP Photo/J. Scott Applewhite)

Rudolph W. Giuliani, a top ally of Donald Trump, said Monday that Sen. John McCain’s latest rebuke of the Republican presidential nominee was likely motivated by the longtime senator’s nerves over his reelection race in Arizona.

“There is nobody who admires John McCain more, and wants him to be reelected more, than me. But I think you’re hearing a guy who’s worried about whether he can be reelected in Arizona,” Giuliani said in an interview with The Washington Post. “John wouldn’t be saying this if he were running two years from now. He’d just keep his mouth shut.”

McCain, a war hero and the GOP’s 2008 presidential nominee, said in a written statement Monday that Trump should not have upbraided Khizr and Ghazala Khan, the Muslim American parents of a U.S. Army solider killed by a suicide bomber in Iraq.

“While our party has bestowed upon him the nomination, it is not accompanied by unfettered license to defame those who are the best among us,” McCain said, singling out Trump for how he has “disparaged a fallen soldier’s parents.”

Giuliani said McCain probably feels compelled to distance himself from Trump due to Arizona’s growing ranks of independents and moderates, while not going so far as to rescind his endorsement of Trump.

Polls show McCain, who is favored to win his party’s Senate primary this month, facing a tight race against Rep. Ann Kirkpatrick (R-Ariz.).

“I want John to win and I’ll do anything I can to help him win. In fact, if he thinks this can help him win, then go ahead and say it,” Giuliani said.

Trump has in recent days repeatedly clashed with the Khans, who appeared last week at the Democratic National Convention in Philadelphia. On stage, Khizr Khan said Trump “consistently smears the character of Muslims” and questioned if the mogul was familiar with the Constitution.

Trump’s response to the Khans, on Twitter and in interviews, has been sustained and unapologetic. In a tweet Monday, Trump reiterated his view that Khizr Khan “viciously attacked me” at the convention and characterized the Khans as political foes who were “all over T.V.”

Giuliani defended Trump’s moves, arguing that Khizr Khan made a “highly politicized and personal attack so I get why he’d get a little upset.” But, Giuliani said, speaking as Trump’s political confidant, he’d counsel the candidate to “start to ignore” the controversy rather than returning to it.

“My advice is he should be battling with Hillary Clinton,” Giuliani said. “There is no question they were being politically exploited by the Democrats but if you leave them unanswered and get off the subject, I don’t think there will be much political impact. Ignore it and let it go off into that part of politics that is forgotten.”