Former Vice President Joe Biden pledged Saturday to National Guard members that he'd never put them in the middle of a domestic political dispute and he'd "restore" respect for civilian-military relations.

"It's been tested lately," Biden said to the virtual National Guard Association of the United States' 142nd General Conference.

JOINT CHIEFS HEAD SAYS MILITARY WON'T HAVE ROLE RESOLVING 2020 ELECTION

"But I promise you as president, I'll never put you in the middle of politics or personal vendettas. I'll never use the military as a prop or as a private militia to violate the rights of fellow citizens. That’s not law and order. You don't deserve that."

Democrats have long accused President Trump of using the armed forces for political goals, citing deployment of troops to the Mexico border and threats to send federal forces to cities led by Democrats to squash protests.

Democratic presidential candidate former Vice President Joe Biden speaks during the fourth day of the Democratic National Convention,  Aug. 20, at the Chase Center in Wilmington, Del. (AP Photo/Andrew Harnik) (AP)

During Biden's virtual speech to guard members, he talked about his late son, Beau, who was a major in the Delaware National Guard, and the importance  of presidential support - from equipment to proper funding.

He accused Trump of denying the Guard necessary resources when he diverted military funding for his longstanding goal of building a border wall with Mexico. Biden panned the wall as "not really keeping us safe."

BIDEN SAYS TRUMP WILL ATTEMPT TO 'STEAL' PRESIDENTIAL ELECTION

Biden also hit Trump for not calling out Russian President Vladimir Putin over intelligence reports that Russia was offering bounties for killing American soldiers in Afghanistan. The White House has said there's "no consensus" that the intelligence is accurate.

"Our troops and our families will never, never have to wonder what side I'm on," Biden said.

Biden's remarks came as the nation's highest-ranking military officer said the armed forces will have "no role" in the 2020 presidential election and reaffirmed that he wants to keep the military "apolitical."

In this June 1 photo, President Trump departs the White House to visit outside St. John's Church, in Washington. Walking behind Trump from left are, Attorney General William Barr, Secretary of Defense Mark Esper and Gen. Mark Milley, chairman of the Joint Chiefs of Staff.  (AP Photo/Patrick Semansky)

Gen. Mark Milley, chairman of the Joint Chiefs of Staff, said in a letter to members of Congress that he intends to keep the military out of any election dispute because it's the role of U.S. courts and Congress to handle.

PORTLAND MAYOR SENDS OPEN LETTER TO TRUMP: 'NO THANKS'

Milley and Defense Secretary Mark Esper both expressed regret for accompanying Trump on a photo op in front of St. John's Church near the White House, where he held up a Bible. Law enforcement forcibly cleared Lafayette Square of racial justice protesters ahead of the D.C. curfew in advance of Trump's short walk to the church.

Milley, who was in uniform for the June 1 photo, called his presence "a mistake" because it gave the impression the military supports Trump's domestic political agenda.