Yes, you can. In Spain, having dog liability insurance is mandatory. If you are planning to move to Spain with your pet, it is advisable to secure coverage before your arrival. You can sign up for a policy using your passport information if you don't have a Spanish NIE yet.
We recommend choosing a policy with coverage across the European Union, especially if you plan to travel with your pet once you settle in Spain.