We just found out about this and a resident has 30 days as they would be importing the car, a visitor/new arrival has 6 months.Yes.
However, the car can only be kept in Spain for a maximum of 6 months if you are a resident here.
After that, it must either go back to UK (permanently) or be registered onto Spanish plates.