Europe and the Refugees

On 4 September 2015, Angela Merkel made one of the most momentous decisions in her chancellorship: She opened the German border to refugees from Hungary. In doing so, she changed refugee policy in Germany and Europe and triggered the so-called refugee crisis in Germany.
What made Angela Merkel take this decision? What role does Europe play? And how much scope did the decision-makers really have?