In the meantime the boat was turning with the effects of the wind and current and drifting into the reeds near the shore.
So, I just forgot about the motor and decided to hoist the main. I could also have used the anchor but it was my reaction. I immediately gained control and tried a few times to restart the motor but it proved useless.
I then decided to sail back to my dock. (Luckily my place is at the end of it!)
The boat sailed very well on the main only and I could dock, maybe a little fast but without damage.
Just to say that if we have sails or oars, we can always get out of motor trouble.