After more than a week sleeping in a frigid encampment on the border between Belarus and Poland, and an abortive foray across the frontier repelled by pepper spray and police batons, Mohammad Faraj gave up this month and retreated to a warm hotel in Minsk, the capital of Belarus.

Soon after, however, he watched with surprise and excitement a video report on Facebook claiming that Poland was about to open its border and urging all those who wanted to enter the European Union to gather at a gas station near the encampment that the migrants had nicknamed "the jungle.”

Faraj, a 35-year-old ethnic Kurd from Iraq, rushed back to the squalid camp he had just left, traveling 190 miles from Minsk to the gas station just in time for the opening of the border in early November that he had heard about on Facebook.