German Chancellor Angela Merkel was on the brink of closing the border at the height of the migrant crisis in 2015, but changed her mind because she feared clashes with border police would look bad on television, a book has claimed.

Driven by Events: Merkel’s Refugee Policy by political journalist Robin Alexander says Mrs. Merkel was warned 40,000 migrants were travelling through the Balkans and could enter Germany in a single weekend.

She then endorsed a set of emergency measures to seal the country’s southern border, deploying thousands of police by bus and helicopter, The Sunday Times reports.

However, German Interior Minister Thomas de Maizière approached the country’s most senior policeman, asking two questions: “Can we live with the images that will come out of this?” and “What happens if 500 refugees with children in their arms run towards the border guards?”

He received the response that police officers on the ground would decide the appropriate action.

Mr. de Maizière then passed the response on to Mrs. Merkel, who changed her mind and kept the borders open.

“For historical reasons, the chancellor feared images of armed German police confronting civilians on our borders,” Mr. Alexander says.

“In the end, Merkel refused to assume responsibility even as everything was in place to close the borders, so they remained open — without an explicit decision,” he added.

Mr. Alexander says the move fuelled “anxiety about migration” throughout Europe and helped sow the seeds of Brexit and the election of U.S. President Donald J. Trump.

Mrs. Merkel may pay a heavy price for her decision at the German federal elections later this year, with polls suggestion new opposition leader Martin Schulz could win enough seats to form a coalition with hard-line left wing parties and oust the chancellor.

The migrant crisis has also seen the anti-immigration Alternative for Germany (AfD) rise in the polls. The party last week called for the country’s borders to be closed, a ban on the Islamic headscarf, and an inquiry into whether the country could bring back the Deutschmark.

“We want to pass on to coming generations a country that is still recognisable as our Germany,” the party said.