Rights over a dog

Hello, year and a half ago when i still lived together with my ex, we took a dog. dog is mixed breed and he was bought from random family, he doesn't have any buying/selling contract. during our life together, i was the one who paid for all the medical bills, food etc. on the dog's passport there are both of our names. year ago we broke up and agreed verbally, that the dog lives with me and is my dog, she can see him once in a while if she wishes. she agreed to that and showed no interest in the dog months. i possess his passport, with all the vaccinations in it, and his old passport he was imported from Russia. I clearly didn't feel, that I need to register dog under my name or take any legal action, because there were no problems with the situation for almost a year. two months ago or so, my ex started demanding rights over the dog. she planned to move to Spain with her new spouse and wanted to take dog with her. i refused multiple times, because all that travelling is not suitable for a dog and also i felt i had put so much money, time and effort in the dog, that suddenly sharing him with someone who had shown zero interest, seemed ridiculous. Not to mention, I find my ex extremely unstable and incapable taking care herself, nevertheless another living creature. I didn't take her threat seriously. Came out without me knowing she registered dog under her name in kennel. I responded, registering his microchip only under my name. I'm still not fully aware which one of those actually matter more. Roughly three weeks ago, she broke into my apartment with intention to steal my dog and take him illegally to Spain (she had printed out a old copy of the passport at our old veterinarian, without having any info of new updated vaccinations). I obviously reported her to police for breaking an entry and for now she did leave to Spain without the dog. My question here is quite simple, how in this situation, can I prove my sole ownership over the dog and how can I protect myself from something like this happening again? Would restraining order against her help and is it easy to apply for? I know dog is treated as a property in the eyes of law, but in this situation seems like we both have equal rights, even though in reality she showed up out of blue just past months.