Visa renewal

I have been in Kenya on a tourist visa for less than 90 days , I arrived at the border of Tanzania yesterday with the intention of going to Zanzibar and was advised by an irate immigration officer that if he stamped my passport I could not return to Kenya ? I have never renewed my visa before .  I was forced to return to Kenya as my return flight ticket and other luggage was there.  Any advice please.  It was my understanding I could renew my visa once without any problem .  Am going to immigration office today to enquire and I still have a week left on my passport.

You stated that you have a week left on your passport. 
If this is correct you cannot enter without at least 6 months left on your passport. This is standard for most countries.

Hi, As I understand it, you have to apply to extend your visa by a further 6 months at an Immigration office, such as Nyayo House in Nairobi.  Am fairly sure that this is not possible at the border.  You should also register as an alien for stays of over 90 days.

The decision to extend your visa is not an automatic one.  It is discretionary and subject to a formal application.  Renewing a visa by crossing the border cannot be done within the East African Community - you would have to return to the UK, or go to Ethiopia, Sudan etc.  I have been told that some immigration officers do not like the practice of crossing the border to renew a visa. 

When you say you have a week left on your passport, I assume that you mean your visa.  I seriously advise you not to overstay.   You are very likely to be arrested and taken to court.  My advice........rush to Nyayo House (probably the best place) and make an application, or leave Kenya before your visa expires.