Immediately after a death, the vehicle can be transferred provisionally to a new owner who may not be the long-term benefactor, but may seek ownership on a temporary basis. This needs to be done within 90 days. More info HERE, in Spanish.
To be able to sell the car you would first need to put the vehicle on your name, and you can only do so when you´ve accepted the inheritance and any inheritance tax due has been paid as you will need to provide paperwork to that effect when you apply for a change of ownership at Trafico.
You can drive the vehicle whilst change of documentation is being carried out.
Information in various languages.
Question: when the vehicle was insured by spouse A, and spouse B as driver, will spouse B still be covered to drive the vehicle if spouse A dies?
Answer: yes, the spouse will still be covered to drive, temporarily. Once the car has been put in the surviving spouse’s name, the policy should be replaced for one where he or she will be registered as vehicle owner and driver