Thanks, the after market radio is from my other bt50 which i also installed and it is the same gen model. And it had no problems. They have the exact same stock radio and everything.
I would retrace my steps, check all fuses and relays. look for a missed wire that is not connected or a burnt wire, check the immobilizer fuse as Nevada said.
… but, if the anti-theft system requires communication with a specific Mazda radio (the same one with which it was originally paired), therein could lie the problem. I am merely speculating, and I hope that the dealership will come to your rescue with a relatively easy “fix”.
OP did reinstall original radio. No luck.
I’m doing some research and I reckon it could be the key is the problem. The key is coded to the immobiliser. The guy I bought the car off has mailed me the spare so I guess I’ll try that when it comes in the mail.