Afghan President Hamid Karzai has said Nato-led forces are "not allowed" to launch attacks on Afghan homes.
He said Nato risked becoming an "occupying force" if it continued attacks which killed civilians.
His latest remarks come after he condemned the killing of up to 14 civilians in the south of the country in a Nato air strike on Saturday.
But a Nato spokeswoman said attacks on houses were necessary and would go on in co-ordination with Afghan forces.
The BBC's Paul Wood in Kabul says the comments point to a serious rift opening up between Mr Karzai and Nato.
This subject has been a constant theme for President Karzai, but it is unclear what he will do if and when more civilians are casualties of Nato air action in the battle against the Taliban, our correspondent says.
The president has now said that Nato is on its "final warning".
"Nato must learn that air strikes on Afghan homes are not allowed and that Afghan people have no tolerance for that anymore," Mr Karzai told a news conference in Kabul.
"If they don't stop air strikes on Afghan homes, their presence in Afghanistan will be considered as an occupying force and against the will of the Afghan people," he said.
Nato spokeswoman Oana Lungescu said the alliance took Mr Karzai's concerns very seriously, and would continue to make every effort to avoid civilian casualties.
But all such strikes were co-ordinated with Afghan forces and "they continue to be necessary", she said.
Sunday's air strike, targeted at insurgents in Helmand province, struck two civilian homes. Afghan officials say all those killed were women and children.
Nato apologised for the air strike on Sunday. A statement by senior Nato generals said the top priority was to prevent civilian casualties and it took such cases very seriously.
The international alliance said that the air strike was carried out after a US marine was killed and five insurgents took cover in a compound in Nawzad district and kept fighting. It said nine civilians had been killed in the attack on the compound.
While insurgents are responsible for most civilian deaths in Afghanistan, correspondents say that the killing of Afghans by foreign soldiers is a source of deepening public anger. In the past, these incidents have prompted angry protests across Afghanistan.
In this instance, a group from the village where the strike happened travelled to Helmand's capital, Lashkar Gah, bringing with them the bodies of eight dead children, some as young as two years old.
But, our correspondent says, privately senior Nato officers are irritated by the president's stance.
Nato feels that it does consult with the Afghan authorities before each operation, presenting a careful assessment each time about the possible threat to civilians from a proposed air strike.
In other instances they carry out air strikes because they deem it an urgent tactical necessity, our correspondent says.