Residency in Algeria

I am married to a algerian, we married in tunisia and we have a marriage certificate also algerian family book.
I was given residency for 3 months. I returned from the UK on the date requested to be told police in Algie capital is refusing to give me residency because I was not married in Algeria. This is absolutely disgraceful given the fact that I am married legally to my Algerian husband for 4 years been basically living here and adding to the algerian economy. 
My question is have anyone else been treated like this ?
What do they want us to do divorce and remarry in Algeria. My guess they would refuse us to marry here because they will find some excuse.  I just can't get my head around it. If we was not legally married I could understand..

go to the police station in Algiers then submit all your papers.. but if you want residence they will not give you. you should stay in Algeria

Ty for your reply I have dual residency.


You should apply for marriage visa at the Algerian embassy in London (overseas). you should be able to get at least one year multi-entry visa. Socialist countries like Algeria, Vietnam, China... married expats to locals cannot apply for residency within the country based on your marriage status to a local. once your marriage visa (don't overstay it), you could try extending it at the immigration office in Algiers , if they refuse you can try any Algerian embassy in neighboring countries, Tunisia or Morocco. good luck:)