France feared encirclement by an alliance between Prussia and Spain