Barcelona secures unexpected defense agreement