"GET out of the car!" the policeman barked. "You're under arrest!" At least, I think that's how the stream of unfamiliar syllables translated. In any case, he was gesticulating furiously and waving his torch around like a light sabre, so I wasn't going to ask for clarification. I'd been in the country less than 12 hours but was evidently already in trouble.
Until then it had been an excellent evening, capped off by a trip to a nightclub to see local singer Thione Seck in action. One of the leading proponents of mbalax, a heady musical mix of rock, funk and frenetic indigenous drums patterns, Seck was one of Senegal's finest and most revered musicians.
I'd arrived at Kilimanjaro, the club in question, about 11pm. It was a ramshackle building in Dakar's Soumbedioune district, on the western seaboard of Senegal's capital city. By day, the sandy expanse surrounding the club hosted a lively artisans' market, teeming with eager and persuasive shopkeepers. I'd required considerable willpower and diplomacy that afternoon to prevent serious expenditure, as intriguing wooden carvings, rugs and musical instruments were thrust in my face.
But hours later, under cover of darkness, all focus was on Kilimanjaro. Groups of guys and girls hung around outside, chatting, smoking and staring with nonchalant amusement at the random foreigner approaching. I tried out the local Wolof greetings I'd learnt on the plane. Judging by the laughter they provoked, my pronunciation needed work.
As the club steadily filled up, the anticipation - and humidity - grew increasingly intense, until Seck finally took the stage at 2am. He launched straight into a euphoric blast of drum- and guitar-fuelled song, and all hell broke loose on the dance floor.
Dancing to mbalax is quite an art form, it turns out, and something I clearly wasn't going to master that evening. Ecstatic fans launched into a wild frenzy of dance moves, hopping up and down and leaping about, knees, elbows and limbs flying everywhere. Evidently, there was unspoken competition to pull off the most flamboyant manoeuvres and the countdown to the first black eye of the evening was on. But somehow, despite the chaos, the dance conveyed the wild excitement of the music with unexpected grace.
Given Seck's stardom, it was no wonder the crowd was in fine form but scenes such as this were common all over town. Dakar is the hub of a vibrant west African music scene and, on any night, there are numerous live shows, from majestic performances by Youssou N'Dour, the godfather of west African pop, to impromptu jams by resurgent guitar hero Souleymane Faye.
For two hours, Seck showed masterful control of his craft and his audience, taking his disciples to nirvana and back. I was mesmerised. After his departure from the stage, however, sleep - and that encounter with the police - swiftly beckoned.
I never did see the inside of a Senegalese police cell. My grave crime - an inability to produce the passport I'd foolishly left at the hotel - was swiftly forgotten when I offered to buy the policeman a coffee. Or rather, offered to pay him in advance for his next 50 coffees. Suddenly, we were great mates. Too bad the cafes didn't do loyalty cards.