White House spokesman Josh Earnest waded into the fierce national debate over Donald Trump's denigration of Sen. John McCain's status as a war hero, and echoed McCain's call for Trump to apologize to all veterans for it.

Earnest made a point of amplifying President Obama's admiration for McCain's "heroism" during his five-year imprisonment in Vietnam even as he acknowledged their clear and often heated differences on foreign policy and other major issues.

"Even in the midst of their competitive 2008 campaign for the White House, then-Sen. Obama expressed his admiration and deep respect for Sen. McCain's heroism," Earnest told reporters Monday.

Their political differences have continued, he said, but "those debates have not reduced his appreciation for Sen. McCain's remarkable service to the country," he said.

Earnest then pivoted to say that that he agreed with McCain that Trump did not need to apologize to the Arizona senator, but instead should apologize to all U.S. veterans.

"The most notable comment in this episode came from Sen. McCain himself, who I think pretty selflessly made clear that he didn't really care about an apology … but he did believe that our military veterans are entitled to one," Earnest said.

Earnest noted that he hasn't spoken to Obama about Trump's controversial statement on Saturday that McCain wasn't really a war hero and that he prefers war heroes that don't get captured by the enemy.

The comments have ignited a firestorm of protest among GOP candidates for president who have condemned Trump for making them. Some have said Trump's remarks make him unfit for the presidency, and have called for him to give up his campaign for the White House.

Earnest declined to say whether Trump should abandon his campaign, but acknowledged his controversial remarks on McCain and others are putting Republicans in an awkward position.

"Obviously, there is a spirited process that's underway on the Republican side ... this will be a significant challenge on the Republican side," he said.