President Donald Trump authorized the killing of Iranian Maj. Gen. Qasem Soleimani seven months ago if Iran's increased aggression resulted in the death of an American, according to five current and former senior administration officials.

The presidential directive in June came with the condition that Trump would have final sign-off on any specific operation to kill Soleimani, officials said.

That decision explains why assassinating Soleimani was on the menu of options that the military presented to Trump two weeks ago for responding to an attack by Iranian proxies in Iraq, in which a U.S. contractor was killed and four U.S. service members were wounded, the officials said.

The timing, however, could undermine the Trump administration's stated justification for ordering the U.S. drone strike that killed Soleimani in Baghdad on Jan. 3. Officials have said Soleimani, the leader of the Islamic Revolutionary Guard Corps' elite Quds Force, was planning imminent attacks on Americans and had to be stopped.

Read the full story on NBCNews.com