Acting U.S. Defence Secretary Patrick Shanahan on Tuesday withdrew from consideration to head the U.S. military, stoking uncertainty about the leadership of the Pentagon at a moment of rising tension with Iran.

The decision comes amid reports of domestic violence in Shanahan's family nine years ago, including between his ex-wife and his son and another account of violence between him and his ex-wife. The alleged incidents emerged as the FBI was conducting background checks ahead of a Senate confirmation hearing.

Shanahan, 56, stepped down Tuesday citing a "painful" family situation that would hurt his children and reopen "wounds we have worked years to heal."

"It is unfortunate that a painful and deeply personal family situation from long ago is being dredged up and painted in an incomplete and therefore misleading way in the course of this process," Shanahan said in a statement.

"I believe my continuing in the confirmation process would force my three children to relive a traumatic chapter in our family's life and reopen wounds we have worked years to heal. Ultimately, their safety and well-being is my highest priority."

He did not provide specifics about the family situation. But the Washington Post published an interview with Shanahan on Tuesday in which he spoke about the circumstances surrounding his 2011 divorce.

Army secretary takes over

Court records show that his ex-wife, Kimberly, was arrested several times on charges that included burglary, property damage and assault. The assault charge was a misdemeanor for domestic violence in August 2010 when, according to police records, she hit Shanahan a number of times, giving him a bloody nose and a black eye. The police report said she was not injured, and he was not charged.

The Post reported a gruesome incident involving Shanahan's teenage son allegedly hitting his mother, Shanahan's ex-wife, with a baseball bat, leaving her unconscious in a pool of blood.

"Bad things can happen to good families ... and this is a tragedy, really," Shanahan told the Post. He added the disclosure of the incident would "ruin my son's life."

This is the longest period the US has gone without a confirmed Secretary of Defense. At a time when we’re sending more troops to the Middle East and navigating the situation with Iran, stable and long-term leadership is mission critical. —@RepJasonCrow

In his statement, Shanahan said he asked to be withdrawn from the nomination process and he resigned from his previous post as deputy defence secretary. He said he would work on an "appropriate transition," but it wasn't clear how quickly he will leave the job.

Trump announced Shanahan's departure in a tweet and said the secretary of the army, Mark Esper, will take over as the new acting defence secretary. Esper, who is widely respected inside the Pentagon, had been considered a leading contender for the job if Shanahan was ultimately not confirmed. Trump told reporters later on Tuesday that he would "most likely" nominate Esper to be the permanent secretary of defence.

He also said he did not ask Shanahan to withdraw.

Delays in confirmation process

But the decision, which Trump said owed to Shanahan's desire to spend more time with his family, promises to prolong what has already been the longest period without a confirmed secretary of defence. Shanahan was the longest official in history to serve as secretary of defence in only an acting capacity, according to Pentagon records.

The post atop the Pentagon has not been filled permanently since James Mattis stepped down in at the end of 2018 following policy differences with Trump.

Trump announced in May that he would nominate Shanahan, but the formal nomination process in the Senate had been inexplicably delayed

Shanahan, a former Boeing executive with no prior experience in national security matters, has been leading the Pentagon as acting secretary since Jan. 1, a highly unusual arrangement for arguably the most sensitive cabinet position.

Trump's critics had already questioned whether Shanahan, without Senate confirmation, had the power to stand up to Trump if he had a difference of opinion on military strategy, since his nomination could be withdrawn at any time.

Top Democrats said on Tuesday that his sudden withdrawal underscores the shortcomings of the White House vetting process for key Trump administration jobs.

Senate minority Leader Chuck Schumer said "this Shanahan fiasco shows what a shambles, what a mess" the administration's national security policy is.

Shanahan's prospects for confirmation were spotty due in large part to questions about his lengthy work as a former Boeing executive and persistent questions about possible conflicts of interest.

The Defence Department's inspector general cleared Shanahan of any wrongdoing in connection with accusations he had shown favouritism toward Boeing during his time as deputy defence secretary, while disparaging Boeing competitors.