After the fall of the Dark Tower and the passing of Sauron the Shadow was lifted from the hearts of all who opposed him, but fear and despair fell upon his servants and allies. Three times Lórien had been assailed from Dol Guldur, but besides the valour of the elven people of that land, the power that dwelt there was too great for any to overcome, unless Sauron had come there himself. Though grievous harm was done to the fair woods on the borders, the assaults were driven back; and when the Shadow passed, Celeborn came forth and led the host of Lórien over Anduin in many boats. They took Dol Guldur, and Galadriel threw down its walls and laid bare its pits, and the forest was cleansed.
In the North also there had been war and evil. The realm of Thranduil was invaded, and there was long battle under the trees and great ruin of fire; but in the end Thranduil had the victory. And on the day of the New Year of the Elves, Celeborn and Thranduil met in the midst of the forest; and they renamed Mirkwood Eryn Lasgalen, The Wood of Greenleaves. Thranduil took all the northern region as far as the mountains that rise in the forest for his realm; and Celeborn took all the southern wood below the Narrows, and named it East Lórien; all the wide forest between was given to the Beornings and the Woodmen.
The Lord of the Rings, Appendix B: Chronology of the Westlands