Osgiliath (Citadel of Stars) was the first capital of Gondor built at the end of the Second Age over the mighty River Anduin between Minas Anor and Minas Ithil.
Osgiliath remained intact until Gondor’s internal war in 1437, when its legendary Dome of Stars was burned along with most of the city, followed by the Great Plague of 1636. The royal court was moved in 1640 to Minas Anor, which later was renamed Minas Tirith. In 2475, Osgiliath was sacked completely by the Uruk-hai legions from Mordor, and although these were driven back the city was now totally deserted.
In the War of the Ring, Osgiliath was briefly defended by Gondor on two occations, but soon fell to Sauron’s servants and its stone bridge was broken. After the destruction of Mordor at the end of the war, Osgiliath was regained by Gondor, but it seems it was never rebuilt during the Fourth Age.