I spent more than a month in Tunisia in January and February of 1997. I had originally intended to be in Tunisia for about 10 days.
According to the then current edition of the Lonely Planet guide to North Africa, Tunis was the best place to get a visa for visiting Libya. In actuality when I went to the Libyan embassy I was told in blunt terms that they would not issue me a visa. No explanation was offered. So that’s how I came to spend over a month in Tunisia.