Key fob / Immobilizer

Hi my bmw 318 ci would not start at all when i turned the key. The lights on the dash board came on and nothing. I locked the car then when I pressed the
button on the key fob the car would not unlock. Then it did unlock then the light never came on.
I called for assistance then the key worked I unlocked the car the light came on and the car started but the clok has reset. Any ideas of whether this could be the car or the key??
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.