as the two ships locked together , the boarding party of seamen and marines stormed aboard and nelson , jumping from the fore-chains into the enemys quarter gallery was able to dash through the cabin to the quarterdeck in time to receive the sword of surrender from the spanish captain .