John P. Carlin, the head of the Justice Department’s National Security Division, is stepping down next month.

Carlin, 43, oversaw the prosecution arising out of the 2013 Boston Marathon bombing and lawyers in his division brought first-ever charges against Chinese military hackers for cyber commercial espionage. On his watch, the department also initiated the first case combining charges of hacking and terrorism.

His departure, announced Tuesday, comes as the division marks the 10th anniversary of its creation in the wake of the Sept. 11, 2001, attacks to integrate the efforts of lawyers working intelligence investigations and prosecutors pursuing terrorism cases.

“Success could no longer be measured by successfully holding responsible those who committed such atrocities,” Carlin said at an anniversary event at the Center for Strategic and International Studies this month. “Success was preventing the attack in the first place.”

Carlin, who is leaving to pursue a job in the private sector, is the youngest and longest-serving head of NSD. He was named acting assistant attorney general in March 2013 and was confirmed in the spring of 2014.

Carlin had previously served as chief of staff to then-FBI Director Robert S. Mueller.

“For the better part of two decades at the Department of Justice, John distinguished himself as a leader who skillfully used all the tools at his disposal to enhance our public safety and uphold our national security,” Attorney General Loretta E. Lynch said in a statement.

Since the division was created, the Justice Department has convicted more than 340 individuals for terrorist-related crimes, Carlin said at a news briefing this month. Last year, he said, the division brought 60 cases linked to the Islamic State, the most such cases in a single year.

There was also a growing awareness in recent years that the government needed to apply the lessons learned in its counterterrorism efforts to the growing cyber threat, Carlin said. At the end of 2012, NSD created a national security cyber specialist network that trained hundreds of prosecutors across the country to handle cyber cases and to be read into the threats coming from top foreign adversaries including Russia, China and Iran. That led, Carlin said, to the charges against the five Chinese People’s Liberation Army officers.