The town consisted of a series of individually fortified districts that reached from the dockyard on the sea front to a castle several hundred feet up the slope of the Rock of Gibraltar. By the end of February, Abd al-Malik's forces had captured the dockyard and the area on the Rock above the castle, where he set up siege engines. Castillian attempts to organise a relief force were hampered by Granadan raids on their borders that were intended to divert Castillian attention.