BERLIN — Leaders of Chancellor Angela Merkel’s governing coalition reached a deal on Sunday to resolve a standoff over the future of the country’s intelligence chief, a dispute that has still further frayed their tenuous alliance.

The spy chief, Hans-Georg Maassen, was removed from his job last week at the insistence of the center-left Social Democrats after he appeared to play down recent violence against migrants. Critics suggested that Mr. Maassen was too sympathetic to the far right and that he might overlook its ties to neo-Nazi groups.

But with Interior Minister Horst Seehofer, a fellow conservative, in his corner, Mr. Maassen could not simply be shown the door. Instead, coalition leaders agreed to replace him as the intelligence chief but give him a new job as a deputy interior minister — a promotion with a hefty pay increase.

The Social Democrats were infuriated, and their leader, Andrea Nahles, called for the deal to be renegotiated.