President Obama on Tuesday announced Marine Gen. Joseph F. Dunford and Air Force Gen. Paul J. Selva as his choices to lead the Joint Chiefs of Staff for the rest of his administration, calling them seasoned leaders who will be called upon as the United States continues to face a variety of threats abroad.

Dunford, the commandant of the Marine Corps, will be the second Marine ever to serve as chairman of the Joint Chiefs. Selva, the chief of U.S. Transportation Command, will be the first Air Force officer to serve as one of the Pentagon’s top two officers in a decade. They must be confirmed by the Senate, but are not expected to face any problems.

Obama, who has had rocky relationships with a number of top military officers, picked generals who are known quantities in the White House. Speaking alongside the two generals in the Rose Garden, the president said he will count on them for their “honest military advice” as the United States counters threats in Afghanistan, Iraq, Syria and other nations.

The president said Dunford, a Boston-area native, is “the definition of Boston Strong.” The two men worked together while the general was the top U.S. commander in Afghanistan, and the president came away “extraordinarily impressed” by him.

“I know Joe,” Obama said. “I trust him. He’s already proven his ability to give me his unvarnished military advice based on his experience on the ground.”

Selva previously worked in the administration as then-Secretary of State Hillary Clinton’s top military adviser, and has a reputation for innovation in the Air Force, Obama said. A cargo pilot, he “grasps the strategic environment in which our forces are operating,” the president said.

“He understands that our military, as powerful as it is, is one tool that must be used in concert with all of the elements of our national power,” Obama said.

The decisions, first reported Monday night, have been greeted well by rank-and-file troops, military leaders and members of Congress.

“Gen. Dunford has been an infantry officer at every level, and Gen. Selva has been an innovator throughout his career,” Defense Secretary Ashton B. Carter said in a statement Tuesday. “They’re exemplary leaders. And they both have the strategic perspective — and operational experience — to help guide our military and advise the president at a time of much change in the world.”

Sen. John McCain (R-Ariz.), chairman of the Senate Armed Services Committee, is frequently a critic of the president, but extended his congratulations to the two generals Tuesday.

“In addition to his leadership of the Marine Corps, General Dunford’s exemplary service in Iraq and Afghanistan makes him a strong choice as we confront threats to stability and peace in both countries and throughout the region,” McCain said. “General Selva’s extensive experience as an operational and strategic leader would be a welcome addition to the Joint Chiefs of Staff. The Senate Armed Services Committee will give these nominations prompt and thorough consideration.”

Army Gen. Martin E. Dempsey, who is expected to retire as chairman of the Joint Chiefs of Staff in October, said in a statement that Dunford is a “phenomenal, combat-tested leader and a man of integrity, courage and humility.” Dempsey called Selva a “leader of competence and character” who has tremendous understanding of global security challenges.

“I have complete trust and confidence that our nation will be well served by these two military leaders at this important time in our history,” Dempsey said. “They will faithfully serve our superb 2.2 million men and women in uniform and their families.”