Owing a car in Tanzania

According to the Tanzanian laws is it possible or rather legally possible for a foreigner to buy and own a used car in his name.

I will appreciate any advice on this please

Yeah for car it's possible

I mean does one need to have a resident permit or can you buy and own one with a visiting visa?