WASHINGTON – The Obama administration is nearing completion of a detailed counterterrorism manual that is designed to establish clear rules for targeted-killing operations but leaves open a major exemption for the CIA’s campaign of drone strikes in Pakistan, U.S. officials said.

The carve-out would allow the CIA to continue pounding al-Qaida and Taliban targets for a year or more before the agency is forced to comply with more stringent rules spelled out in a classified document that officials have described as a counterterrorism “playbook.”

The document, which is expected to be submitted to President Obama for final approval within weeks, marks the culmination of a yearlong effort by the White House to codify its counterterrorism policies and create a guide for lethal operations through Obama’s second term.

A senior U.S. official involved in drafting the document said that a few issues remain unresolved but described them as minor. The senior U.S. official said the playbook “will be done shortly.”

The adoption of a formal guide to targeted killing marks a significant — and to some, uncomfortable — milestone: the institutionalization of a practice that would have seemed anathema to many before the Sept. 11, 2001, terrorist attacks.

Among the subjects covered in the playbook are the process for adding names to kill lists, the legal principles that govern when U.S. citizens can be targeted overseas and the sequence of approvals required when the CIA or U.S. military conduct drone strikes outside war zones.

U.S. officials said the effort to draft the playbook was nearly derailed late last year by disagreements between the State Department, the CIA and the Pentagon on the criteria for lethal strikes and other issues. Granting the CIA a temporary exemption for its Pakistan operations was described as a compromise that allowed officials to move forward with other parts of the playbook.

The decision to allow the CIA strikes to continue was driven in part by concern that the window for weakening al-Qaida and the Taliban in Pakistan is beginning to close, with plans to pull most U.S. troops out of neighboring Afghanistan over the next two years. CIA drones are flown out of bases in Afghanistan.

“There’s a sense that you put the pedal to the metal now, especially given the impending” withdrawal, said a former U.S. official involved in discussions of the playbook. The CIA exception is expected to be in effect for “less than two years but more than one,” the former official said, although he noted that any decision to close the carve-out “will undoubtedly be predicated on facts on the ground.”

The former official and other current and former officials interviewed for this article spoke on condition of anonymity because they were talking about ongoing sensitive matters.

Obama’s national security team agreed to the CIA compromise in late December during a meeting of the “principals committee,” comprised of top national security officials, that was led by White House counterterrorism adviser John O. Brennan, who has since been nominated to serve as CIA director.

White House officials said the committee will review the document again before it is presented to the president. They stressed that it is not in force until Obama has signed off. The CIA declined requests for comment.