BEIRUT, Lebanon — Arresting images of desperation on the West’s doorstep have brought Syria, for the moment, back to worldwide attention: refugees cramming into train stations and climbing border fences; drowned Syrian toddlers washing up on beaches, a girl in polka dots, a boy in tiny shoes.

It was never any secret that a rising tide of Syrian refugees would sooner or later burst the seams of the Middle East and head for Europe. Yet little was done in Western capitals to stop or mitigate the slow-motion disaster that was befalling Syrian civilians.

“The migrant crisis in Europe is essentially self-inflicted,” said Lina Khatib, a research associate at the University of London and until recently the head of the Carnegie Middle East Center in Beirut. “Had European countries sought serious solutions to political conflicts like the one in Syria, and dedicated enough time and resources to humanitarian assistance abroad, Europe would not be in this position today.”

The causes of the current crisis are plain. Neighboring countries like Lebanon and Jordan became overwhelmed with refugees and closed their borders to many, while international humanitarian funding fell further and further short of the need. Then, Syrian government losses and other battlefield shifts sent new waves of people fleeing the country.