WASHINGTON - President Obama will nominate Ashton Carter, a physicist with long experience at the Pentagon, as his new secretary of defense, according to current and former U.S. officials familiar with the decision.

If confirmed by the Senate, Carter would succeed Chuck Hagel, the former Nebraska senator who is being pushed aside by the White House after less than two years in the job. Hagel, a Republican, fell out of favor with Obama and the president's inner circle as the U.S. military became embroiled in a new war in the Middle East, a challenge that is expected to preoccupy the Obama administration for the remainder of its term.

Although Carter has more experience as a technocrat than as a wartime leader, his extensive national-security credentials and support for his nomination in Congress made him an appealing choice.

White House press secretary Josh Earnest declined Tuesday to confirm that Carter was the president's selection, but praised him fulsomely. He said Carter had "served the president and the American people well" at the Pentagon.

"He is somebody who deserves and has demonstrated strong bipartisan support for his previous service in government," Earnest said. "He has a detailed understanding of the way the Department of Defense works."

Officials said the timing of a formal announcement was still being worked out. Already, however, several lawmakers were predicting that Carter would be easily confirmed.

"Great, very highly qualified," said Sen. Carl Levin (D., Mich.), the chairman of the Senate Armed Services Committee. Sen. John McCain (R., Ariz.), who will replace Levin as chairman next month, called Carter a "noncontroversial" choice. Both senators said they had yet to receive formal notification from the White House of Carter's selection.

Carter, 60, is little known outside Washington but is renowned for his intellect. A Rhodes scholar, he earned a doctorate in theoretical physics from Oxford University and holds degrees in physics and medieval history from Yale University. (He is a 1972 graduate of Abington High School.)

A longtime faculty member at Harvard University, he began lecturing at Stanford University this fall.

Formerly the No. 2 at the Pentagon and before that its chief weapons buyer, Carter was passed over for the top job in early 2013 when it went to Hagel.

Carter stayed on for a year as deputy defense secretary - essentially, the chief executive of the Pentagon bureaucracy - but his relationship with Hagel was seen as awkward.

At a farewell ceremony for Carter at the time, he was jokingly lauded as a "middle-aged uber-wonk" by Army Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff. "I think he's been called the most important, least-known figure in Washington, or some language to that effect, and I agree with that," Dempsey said.

Carter would be the first defense secretary to come of age after the Vietnam War. He graduated from Yale in 1976, three years after the end of the draft.

He did not serve in the uniformed military but first joined the Pentagon in 1981 as a civilian analyst, working on missile defense, the nuclear arsenal, and programs to ensure the continuity of government in the event of nuclear war. One of his early projects was to assess the merits of a pie-in-the-sky scheme to make it difficult for the Soviet Union to track MX missiles by deploying them on giant blimps over the United States.

As his career progressed, Carter became the rare high-ranking Pentagon official who had a granular understanding of how its most sophisticated weaponry worked.

"I think his particular skill set is the ability to combine a technical intelligence, a knowledge of the technical, esoteric dimensions of defense, with a broad policy perspective that's informed by history," said Joseph Nye, who worked with Carter on the Harvard faculty and served with him at the Pentagon during the Clinton administration.

In addition to studying the minutiae of theoretical physics, Carter wrote an undergraduate thesis at Yale on the Latin writings of 12th-century Flemish monks.

Carter also has an earthy side that displayed itself during his stints at the Pentagon. Former colleagues said he speaks plainly and, at times, can curse like a drill sergeant.

According to his autobiography, he was fired from his first job at a Philadelphia car wash at age 11 "for wise-mouthing the owner." Among other occupations that he listed from his pre-college years were gas-pump attendant, hospital orderly, fishing boat crewman, and counselor for a suicide-prevention hotline.