U.S. President Donald Trump has told advisers he will replace Defense Secretary Mark Esper after the presidential election, Bloomberg News is reporting.

Trump and Esper were "not in a good place" but the president wasn't planning to do anything about the situation until after the general election Nov. 3, according to sources who asked not to be named.

Sources said Trump was exasperated with Esper for failing to support him on national security issues including Russia. Recent decisions by the defense official haven't sat well with the president, they said.

The latest discord was an evaluation in the aftermath of the deadly explosion in Lebanon that left Trump furious. Trump said it was the work of terrorists and he quoted information from high-ranking "generals." But Esper said it was an "accident."

In June Esper contradicted Trump's plan to deploy uniformed personnel in response to nationwide demonstrations following the killing of George Floyd by a Minneapolis police officer.

Meanwhile, one source said Esper had made it clear to close friends in the Pentagon he would quit. However, an official close to Esper told Bloomberg News that Esper would continue as defense secretary if the president was re-elected.

However, the appointment last week of Anthony Tata, a retired Army brigadier general, to a Pentagon post appears to have given the president a candidate for Esper's possible replacement.

Democrats and Republicans say Esper has been effective at the Pentagon - especially during a stormy administration that has seen the commander in chief repeatedly drag the military into political matters including the Mexico border wall.