The official, speaking on condition of anonymity, said an agreement was reached but did not explain how it resolved a dispute between France and the United States over command and control.
Paris had objected to an American general heading the mission.
Secretary-General Jaap de Hoop Scheffer was to brief reporters later on the details.
Washington had insisted the commander of the NATO mission be linked to the U.S.-led coalition, which will be providing protection.
The deal was reached after three days of marathon talks between NATO's 26 ambassadors and de Hoop Scheffer, who wanted an agreement this week.
It means a planned exploratory mission to Iraq will go ahead in August, an official said.
NATO ambassadors reconvened Friday after consulting capitals on the last outstanding issues.
Paris, which abandoned its objections to a NATO presence inside Iraq, rejected the idea of placing the mission under the operational command of U.S. Gen. George Casey, the senior U.S. officer in Iraq.
Washington argues the idea is the best way to protect the mission and ensure its effectiveness.
The U.S. proposal had the backing of a majority of the 26 NATO nations, but unanimity was needed for a decision.
Paris had suggested postponing a decision on command until September to let the first phase of the mission begin Aug. 6.
NATO leaders agreed to the missions at their summit a month ago but left details vague.
Another outstanding issue had to do with whether the mission should be commonly funded by all allies, like the NATO peacekeeping mission in Afghanistan, or only by those sending troops.
The command issue is especially sensitive for Paris and a handful of other countries that opposed the U.S.-led war and have refused to send troops to help with the aftermath.
The initial mission NATO intends to send Aug. 6 would comprise only 30 or so people and report back to NATO headquarters Sept. 15. It will be followed by a larger mission.
So far NATO's role in Iraq has been limited to providing logistical backup to a Polish-led division working with the American troops. Although 16 NATO members already have some troops there, they are not under the NATO flag.