Acting U.S. Defense Secretary Patrick Shanahan said Tuesday he will step down due to a "painful and deeply personal family situation."

President Donald Trump announced Shanahan's departure in a Twitter post, and said he will name Army Secretary Mark Esper to be the new acting Pentagon chief.

Shanahan has asked to be withdrawn from his nomination for defense secretary, Trump said, with U.S. media reporting acts of domestic violence involving Shanahan's family in and around 2010.

"Acting Secretary of Defense Patrick Shanahan, who has done a wonderful job, has decided not to go forward with his confirmation process so that he can devote more time to his family," Trump said.

Shanahan's nomination would have required Senate confirmation.

"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," he said.

Shanahan had been under investigation for allegedly seeking preferential treatment of Boeing Co., his former employer. But the Pentagon's inspector general found in April that he did not commit ethics violations in his government job.

Following the December resignation of Jim Mattis over policy differences with Trump, Shanahan took on the acting Pentagon chief role in January.

He became deputy defense secretary in July 2017 after serving as senior vice president for supply chain and operations at Boeing.