Chuck Rosenberg, acting head of the Drug Enforcement Agency, will leave effective October 1, NBC News has confirmed.

The New York Times reported, citing law enforcement officials, that Rosenberg had become dismayed with President Donald Trump, believing he has little respect for the law.

A former federal prosecutor and Obama administration holdover, Rosenberg previously served as chief of staff to fired FBI director James Comey.

In a July email obtained by NBC, Rosenberg told his staff that "we have an obligation to speak out when something is wrong."

His email came after Trump made remarks in a speech that seemed to encourage police officers to treat suspects roughly.

Rosenberg wrote in his email that the president's comments "condoned police misconduct." He listed values that he said were central to how law enforcement professionals should behave. Those included "Rule of Law, Respect and Compassion, Service, Devotion, Integrity, [and] Accountability."

— NBC News contributed reporting.