Gen. Joseph Dunford, the chairman of the Joint Chiefs of Staff, has issued guidance to military commanders stressing that there will be no change in military policy toward transgender service members until Defense Secretary Jim Mattis receives further direction from the White House.

President Trump announced via Twitter on Wednesday what appeared to be a reinstatement of the military's ban on transgender service members.

"I know there are questions about yesterday’s announcement on the transgender policy by the president," Dunford said in a written message to military commanders, according to a copy obtained by ABC News.

"There will be no modifications to the current policy until the president's direction has been received by the secretary of defense and the secretary has issued implementation guidance," continued Dunford, the nation's top military commander.

"In the meantime, we will continue to treat all of our personnel with respect," he said. "As importantly, given the current fight and the challenges we face, we will all remain focused on accomplishing our assigned missions."

The Pentagon was caught off guard by Trump’s Twitter announcement. A ban on transgender military service members was lifted by then–Defense Secretary Ash Carter last summer.

General Mark Milley, the Army's chief of staff, said Thursday that he had not known beforehand of the president's announcement.

"I personally did not, but nor would I have expected to," Milley said.

The Pentagon's chief spokesperson issued a statement Thursday that the Pentagon was awaiting further guidance from the White House.

"The Department of Defense is awaiting formal guidance from the White House as a follow-up to the Commander-in-Chief's announcement on military service by transgender personnel," said Dana White. "We will provide detailed guidance to the Department in the near future for how this policy change will be implemented. The Department will continue to focus on our mission of defending our nation and on-going operations against our foes, while ensuring all servicemembers are treated with respect."

Vice Adm. Robert Burke, the Navy's top personnel officer, issued guidance to his commanders Wednesday that no personnel actions should be taken until further guidance is received by the White House and that no ongoing medical treatments for transgender sailors should be ceased, writing, "Currently serving TG [transgender] service members will continue to receive all necessary medical care."

"With regard to implications for those currently serving, OSD [the Office of the Secretary of Defense] is working to quickly discern the president's intent," Burke said in a copy of the guidance obtained by ABC News. "Treating service members with dignity and respect is something we expect from our sailors at all times."

The military does not track the number of transgender military service members through its personnel records, but the armed services have information about service members who have contacted military medical services about a possible transgender transition.

About 160 sailors and fewer than five Marines are undergoing some form of transgender transition through the Navy's medical services, according to a Defense Department official. About 80 Army personnel are in similar transitions. The Air Force does not provide details about how many of its members may be in transition.