The head of the Justice Department's criminal division, Edward S.G. Dennis Jr., is expected to announce his resignation today in the fourth major personnel shift at the department in six weeks.

Department officials characterized Dennis's departure as amiable and long-expected, unlike the resignation last month of Attorney General Dick Thornburgh's top deputy, Donald B. Ayer.

Thornburgh expects to announce Dennis's replacement shortly, a high-ranking department official said.

Dennis, who has been a federal prosecutor for about 16 years, will become a senior partner at the law firm of Morgan, Lewis and Bockius, department officials said. He will join the national litigation section of the Philadelphia-based firm, which also has offices in Washington.

A source familiar with Dennis's situation said Dennis delayed his announcement for some time in order not to add to the perception of dissatisfaction within the department over Thornburgh's management style and his handling of a leak investigation.

The source said Dennis, who now commutes daily to Washington from Media, Pa., decided to leave for both professional and personal reasons, including the fact his son is entering college. Dennis could not be reached for comment last night.

"He has a good relationship with the AG," said one department official. "This is something he's been planning for a long time."

Thornburgh only last month chose a new deputy, William P. Barr, after the abrupt resignation of Ayer. He still is attempting to find a press secretary to replace David R. Runkel, who was reassigned in May to the position of director of communcation.

Last month also saw the reassignment of Thornburgh's closest aide and executive assistant, Robert S. Ross Jr., to a much less sensitive post. Officials inside and outside the department, including Ayer, complained bitterly that Ross cut off access to the attorney general and that department business was delayed because Thornburgh relied on Ross, Runkel and another longtime political aides instead of department officials.

Ayer said publicly he left in mid-May because he felt Thornburgh attempted to undercut the authority of the department's internal watchdog unit, the Office of Professional Responsibility (OPR), and shut him out of the day-to-day management of the department.

According to Ayer, both he and Dennis went to Thornburgh in January to tell him he should let OPR investigate whether anyone in the department leaked a story to CBS News about an FBI probe of the office of Rep. William H. Gray III (D-Pa.), now House majority whip. A criminal investigation ordered by Thornburgh and conducted under Dennis did not identify the source of the leak. However, Thornburgh's two closest aides, Ross and Runkel, were considered suspects. Both showed deception on lie-detector tests.

Thornburgh turned down the request for an OPR inquiry from Ayer and Dennis but later capitulated under pressure from key congressmen. No administrative action was taken against any department employee as a result of OPR's review of the case and a third review by Solicitor General Kenneth W. Starr. Thornburgh denied OPR's request to investigate further.

Staff writer Ruth Marcus contributed to this report.