Defense Secretary Jim Mattis participates in a press conference at the Pentagon on May 19. 2017. (Shawn Thew/European Pressphoto Agency)

The long struggle between the White House and Defense Secretary Jim Mattis over senior Pentagon personnel appointments is showing signs of a breakthrough, with an agreement on who will be the Defense Department’s No. 3 official. But tensions between the two sides remain.

John Rood, a State Department and National Security Council official in the George W. Bush administration, has been offered and has accepted the job of undersecretary of defense for policy, a senior White House official said. The timing of the announcement is unclear, and Rood’s confirmation process could take weeks if not months. But his appointment will fill a major hole in the senior leadership of a Pentagon embroiled in several crucial policy reviews and engaged in multiple ongoing conflicts.

The White House official also said that the Pentagon could have a new chief weapons purchaser soon as well. Ellen Lord, the chief executive of defense contractor Textron Systems, is the leading candidate for undersecretary of acquisitions, technology and logistics, a job overseeing hundred of billions of dollars of weapons and services programs around the Defense Department.

A Pentagon spokesman declined to comment, and the White House press office did not respond to requests.

Rood’s selection will be met with broad support in the national security establishment and on Capitol Hill. He served as acting undersecretary of state for arms control at the end of the Bush administration. Before that, Rood was confirmed by the Senate as assistant secretary of state for international security and nonproliferation. He has also served in the Pentagon, on Capitol Hill for Sen. John Kyl (R-Ariz.) and spent 11 years as an analyst for the Central Intelligence Agency. He is currently a senior executive at Lockheed Martin.

If and when he is confirmed, Rood will take over a Pentagon policy shop that has been rudderless since the Trump administration started. In recent weeks, several lower positions inside the office have been filled, including the naming of Robert Karem as assistant secretary of defense for international security affairs and Owen West as assistant secretary of defense for special operations and low-intensity conflict.

Just below that level, there have been a few appointments, including Elbridge Colby as deputy assistant secretary for strategy and force development, Pete Giambastiani as principal deputy assistant secretary for legislative affairs and Thomas Goffus as deputy assistant secretary for Europe and NATO.

Last month, the Senate confirmed Karem and two other senior Pentagon officials, Comptroller David Norquist and Principal Deputy Undersecretary of Defense for Intelligence Kari Bingen. President Trump formally nominated the next deputy defense secretary, Patrick Shanahan, on Wednesday.

All of that activity would suggest that the long struggle between the White House personnel office and Mattis’s staff over Pentagon staffing is coming to an end. But administration officials said that the well-reported wrangling between the two sides continues, as many major jobs remain unfilled. The often contentious negotiations are conducted primarily between Mattis’s chief of staff, Kevin Sweeney, and Mira Ricardel, the White House’s lead official on Pentagon personnel.

Ricardel has been named as the next undersecretary of commerce for export administration, but remains in her White House personnel post pending her own confirmation. Early on, she had been rumored to be the White House’s pick for Pentagon policy chief, but Mattis vetoed the idea. Mattis then pushed hard for retired ambassador Anne Patterson to get that post, but Trump rejected her.

The two sides have also struggled to agree on service secretaries. Heather Wilson has been confirmed for the Air Force, but Trump’s choices for both Army and Navy secretary withdrew, claiming difficulty in untangling their business interests. Last week, Trump announced his intent to nominate banker Richard Spencer, a retired Marine, to lead the Navy. Officials said Mattis drove that selection.

Several senior positions remain empty with no clear candidate emerging, including undersecretary of defense for intelligence, undersecretary of defense for personnel and several assistant secretary positions. This week, Trump announced his intent to nominate former Army Ranger Ryan McCarthy to be undersecretary of the Army but there’s no word on who will be the top official at that service.

Despite the slow pace and the repeated setbacks, senior staffing at the Pentagon is going measurably better than at the State Department, where only one senior official and a handful of ambassadors have been put forth for confirmation.

“There are lots of people in the pipeline right now, and we will expect more names coming forward,” State Department spokeswoman Heather Nauert told reporters Tuesday.

One administration official said that Secretary of Sate Rex Tillerson is intentionally delaying the selection of senior officials inside the department, with the help of his chief of staff, Margaret Peterlin. “He hasn’t interviewed a single person for an assistant secretary job,” the official said.

Tillerson has already suffered one public rebuke on personnel, when he put forth Elliott Abrams to be his deputy, only to have Trump reject the pick. Both he and Mattis need to continue to find ways to staff up with professionals whom they trust and whom the White House can accept.