Passengers on the rush hour tram in Alicante's San Vicente del Raspeig neighbourhood watched on in disbelief as Cristian Galera removed a white shirt and black trousers while dancing to Joe Cocker's You Can Leave Your Hat On.
At the end of the performance — greeted with scattered applause and plenty of laughter — he was wearing only a pair of black boxer shorts.
"Thanks very much, you're on Candid Camera," announced Galera as said goodbye to the passengers.
In fact the dance was a dare: Galera is a member of RandomLife, a group of three friends who carry out challenges laid by their Twitter followers.
Apart from the latest tram dare, they have taken on challenges including breaking computer keyboards over their heads and escorting women along the street with open umbrellas.
Possible future challenges include a beachfront bike ride in a g-string.