AU troop mission to go to Comoros
The fighting was sparked when the leader of one of the islands refused to stand down as the constitution demands if he wants to run again for president.
The tension raised fears of another coup on the Indian Ocean archipelago which has been plagued by coup bids.
The islands have experienced more than 20 coups or attempted coups, beginning just weeks after independence from France in 1975.
The islands appeared to be stabilizing under the 2001 constitution granting greater autonomy within a federation.
When Anjouan's outgoing president, Mohamed Bacar, refused to give up power in April, national troops were sent in to try to force him to resign.
Anjouan's paramilitary police -- loyal to Bacar -- then attacked the 80 national army soldiers.
The AU said its mission would be deployed for an initial period from 13 May to 31 July 2007.
It condemned the attacks on Anjouan "as well as acts of harassment that have been committed in the island".
African analyst Ahmed Rajab told the BBC that Anjouan has secessionist tendencies.
In 1997, the islands of Anjouan and Moheli declared unilateral independence but agreed to greater autonomy under a union constitution.