President Barack Obama has replaced the No. 2 man at the Central Intelligence Agency -- a tough-minded counterterrorist -- with a lawyerly woman who wants to dial back the lethal and illegal operations of American intelligence.

The CIA, far richer and stronger since Sept. 11, has given priority to hunting and killing terrorists. But killing is the job of the military, not the nation’s premier spy service. Obama says he wants to use it first and foremost as an espionage agency, not a lethal force. After 25 years as a spy-watcher, I believe this is a very good thing, and a long time coming.

It's good news for anyone who thinks the agency ought to return to its origins of gathering and analyzing intelligence. It closes the door on the era of secret prisons, torture and kidnappings conducted in the name of national security.

It may be bad news for those who believe in the kill-them-all, let-God-sort-‘em-out tactics of the war on terror. And it may be red meat for the Benghazi conspiracy theorists in Congress.

Mike Morell is out. He started at the CIA in 1980 as an intelligence analyst, just like the new director, John Brennan, Obama’s White House counterterrorism adviser until he took over the agency. Morell had the bad luck to have been the briefer who delivered the Aug. 6, 2001 report entitled “Bin Laden Determined to Strike the U.S.” to an inattentive President George W. Bush. After Bin Laden struck on Sept. 11, Morell went overseas in a clandestine posting and worked counterterrorism -- “the dark side,” as former Vice President Dick Cheney called it. He became a defender of the CIA’s harsh interrogation techniques of suspected terrorists.

He also defended its conduct after the Sept. 11 attack on the American outpost in Benghazi, Libya, in which the U.S. ambassador and three other Americans died. He made the final edits on the Benghazi “talking points” that have become fodder for conservative fire-breathing on cable television and in Congress. The points are comprehensible only when you know that Benghazi was an outpost largely owned and operated by the CIA, which must bear the brunt of blame for its fall.

Avril Haines, who at 43 is 15 years younger than Morell, is from another time and another mindset. She has been the White House deputy counsel for national security affairs since 2010; as the National Security Council’s lawyer, she has wrestled with the legal ramifications of drone strikes abroad and intelligence-gathering at home.

Her appointment may create some apoplexy among the covert operators at CIA. But the point of her nomination is clear.

She was a leading intellectual author of Obama’s May 23 speech at the National Defense University, when he said it was high time for the U.S. to run the Sept. 11 counterattack under the laws of war. Obama made it clear that he wants to know the enemy before killing the enemy: “We must make decisions based not on fear but on hard-earned wisdom -- and that begins with understanding the current threat that we face.” And he also wants to know how this war will someday come to a close. “This war, like all wars, must end," he said. "That’s what history advises. It’s what our democracy demands.”

Obama has asked Brennan to recast the CIA according to its original charter: To create a corps of smart spies sharply focused on espionage, providing the president with the best intelligence money can buy. Haines's job as the new No. 2 woman will be to help the CIA do this difficult, dangerous, dirty work under law.

(Tim Weiner, a former national security correspondent for the New York Times, is the author, most recently, of “Enemies: A History of the FBI.”)