 In August, the French captured the castle of Montjuïc, the main defensive point.Undeterred, Álavarez constructed barricades and trenches inside the city and battle raged for another four months before Álavarez, exhausted and ill, handed over command to a subordinate.Two days later, on 12 December, the town capitulated.