WASHINGTON — In the days before they filed the sentencing recommendation for President Trump’s friend Roger J. Stone Jr. that helped plunge the Justice Department into turmoil, the prosecutors on the case felt under siege.

A new boss, Timothy Shea, had just arrived and had told them on his first day that he wanted a more lenient recommendation for Mr. Stone, and he pushed back hard when they objected, according to two people briefed on the dispute. They grew suspicious that Mr. Shea was helping his longtime friend and boss, Attorney General William P. Barr, soften the sentencing request to please the president.

In an attempt to ease the strain, David Metcalf, Mr. Shea’s chief of staff, clasped his hand on the shoulder of one of the prosecutors, Aaron S.J. Zelinsky, as they passed in a hallway. But the gesture prompted a terse and sharp verbal exchange, according to three people briefed on the encounter. As word of the spat spread through the office, unfounded rumors swirled that the altercation had been physical.

Skepticism of Mr. Shea, the acting U.S. attorney for Washington, only deepened in his 600-person office when Mr. Barr quickly intervened to recommend a lighter sentence for Mr. Stone just as the president declared on Twitter that the government was treating his friend too harshly.