WASHINGTON — Gen. Martin E. Dempsey, the chairman of the Joint Chiefs of Staff, recommended to Defense Secretary Chuck Hagel on Tuesday that all members of the armed services working in Ebola-stricken West African countries undergo mandatory 21-day quarantines upon their return to the United States.

Rear Adm. John Kirby, the Pentagon press secretary, said that Mr. Hagel was expected to announce shortly that he would follow the recommendation.

The recommendation follows a directive from Gen. Ray Odierno, the Army chief of staff, who has ordered a 21-day “controlled monitoring” period for Army personnel returning from the Ebola zone in West Africa. Army officials are not using the word “quarantine,” but they said that returning soldiers would be isolated in separate buildings on American bases and would not be allowed to see their families for 21 days.

General Dempsey’s recommendation came a day after the Centers for Disease Control and Prevention issued new guidance to states on how to treat civilian health workers when they return to the United States from West Africa. Officials recommended against automatic quarantines but said that health workers should be actively monitored for symptoms of Ebola.