Transmission problems

Hi everybody. I was hauling my camping trailer up a pretty steep hill today, and was about to shift down to 3.rd gear (automatic transmission)when all of a sudden it
would not pull anymore. The engine R.P.M's went up, but the speed decreased. It was almost as the chain had jumped off a bicycle. First I tried to stop the engine and then start it again, but to no avail. I then let the car and trailer roll slowly down the hill just to get out of the road. NOTHING was working. After a while I tried to give some throttle, and it started to pull at around 2500 rpm's, and it seemed like it was in 2.nd or 3.rd gear. I then moved the gear lever thru the entire range from to park, and back to Drive, and everything was working again. I have driven approximately 300 km's since then, and everything seems to be working all right. Does anyone know what was happening??? I would really appreciate some input since it is my first day of the vacation, and If something is about to happen I really would like to know about it.
I might add that I drive a 1999 E220 CDI Wagon Thanks in advance Steinar Fagerheim
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.