Spanish PM warns Brexit a ‘serious threat’ to economy