(CNN) America's most senior general warned that "divisiveness leads to defeat" in a speech to Naval War College graduates on Wednesday.
Chairman of the Joint Chiefs of Staff Mark Milley counseled the audience to "eliminate anything that divides us."
While he also spoke of the traditional need to keep an eye on adversaries "during periods when we are weary from conflict or otherwise preoccupied," and did not mention President Donald Trump by name, his comments appeared to address the broader backdrop of racial divisiveness in the country and concerns within the Pentagon about the military becoming politicized.
Milley told the students, "We who wear the cloth of our nation must hold dear the principle of an apolitical military that is so deeply rooted in the very essence of our Republic."
His speech followed Defense Secretary Mark Esper's announcement of a major review last week aimed at improving diversity and "ensuring equal opportunity across all ranks" of the US military.
The Pentagon effort to address racism and promote equality, even as leaders try to avoid White House politics, has been notable and follows Milley's extraordinary apology for appearing in a photo-op with Trump after the forceful dispersal of peaceful protesters outside the White House earlier this month.
Esper similarly acknowledged the problematic nature of his own appearance and later told reporters he did not want to see active duty forces on the streets of Washington, DC -- a statement that increased tensions between the Pentagon and the White House.
Several current defense officials with access to both men say the two are deeply concerned about Trump attempting to politicize the military and potentially dragging the forces into the presidential election campaign.
"Both realize over the last month that the Defense Department has been overexposed and politicized" a senior administration official said, blaming both the White House and Democrats.
While there are always political tensions as an election looms, Trump has done little to assure Esper or Milley of his unqualified support for them. In an interview with Axios, Trump said Esper and Milley should have been "proud" to be with in the photo-op.
Esper has repeatedly let it be known he thought Trump might fire him and he had also prepared a letter of resignation earlier this month. Similarly, Milley consulted a number of senior retired and military officers to seek their advice on whether he could continue effectively in the role, according to officials with direct knowledge.
While Milley has made two speeches to military audiences, and Esper has visited some military bases, neither of them has engaged publicly or answered questions from the press in recent weeks.
On Wednesday, Esper departed for meetings at NATO in Brussels, in part to discuss Trump's orders to remove 10,000 troops from Germany, something the Pentagon is not anxious to do in the face of Russian aggression in eastern Europe. That trip is expected to be very low key with Esper currently not scheduled to speak publicly.
However, Esper and Milley may not be able to avoid tough questions for long.
There are tentative plans for them to testify before the House Armed Services Committee just after the July 4 recess about the use of National Guard troops and the calling up of active duty forces during the recent protests prompted by the police killing of George Floyd in Minneapolis.
That hearing could be the first time the brewing tensions between the Pentagon and the White House are brought clearly into the public view.