Late in 999, the Leinstermen, historically hostile to domination by either the Uí Néill overkings or the king of Munster, allied themselves with the Norse of Dublin and revolted against Brian Boru. This provided the opportunity for Sigtrygg's second alliance with Máel Mórda mac Murchada. Brian's forces inflicted a crushing defeat on the united Leinster-Dublin army at the Battle of Glenmama, and followed the victory with an attack on the city of Dublin. The 12th-century "Cogadh Gaedhil re Gallaibh" gives two accounts of the occupation: Brian remained in Dublin from Christmas Day until Epiphany (6 January), or from Christmas Day until St. Brigid's Day (1 February). The later "Annals of Ulster" date the Battle of Glenmama to 30 December 999, while the "Annals of Inisfallen" date Brian's capture of the city to 1 January 1000. In any case, in 1000 Brian plundered the city, burned the Norse fortress and expelled Sigtrygg.