Italy entered World War I on the Allied side and conflict with Austria-Hungary began on May 24, 1915. The hills west of Gorizia soon became the scene of fierce battles between the Italian and Austro-Hungarian armies. The town itself was seriously damaged and most of its inhabitants had been evacuated by early 1916. The Italian Army occupied Gorizia during the Sixth Battle of the Isonzo in August 1916, with the front line moving to the eastern outskirts of the town. With the Battle of Caporetto in October and November 1917, when the Central Powers pushed the Italians back to the Piave River, the town returned to Austro-Hungarian control.