The 13-year-old had taken her little pony out on Sunday afternoon - but her parents raised the alarm when she failed to return to the family home near Cloppenburg, Lower Saxony.
Hundreds of police officers, Red Cross volunteers and fire fighters joined the search - and found the desperate girl and her pony shortly after midnight. They had been trapped chest deep in the swampy mud for hours and were both exhausted.
She was pulled out relatively easily and taken to hospital - but it took a further two hours to free her pony from the muddy mess. Both were very cold and wet, but neither were seriously hurt, although the pony was in such a state of shock that it could not walk at first.
A police spokesman said: “She has a route that she rides every time, but this time she went another way. There is a river and around the river it is very boggy.”
“The horse walked into the mud on its own,” he added. “But I received information that as the girl tried to pull the horse out she was also sucked in.”
The pair had left home on Sunday afternoon but failed to return, prompting her parents to go out looking for her. They called the authorities after being unable to find her themselves.
Nobody had heard the 13-year-old’s cries since the wetlands by the river Soeste were far from the surrounding villages, the police spokesman said.