BUDAPEST — The Keleti train station in Budapest, which has emerged as a setting in the tumultuous drama of Europe’s escalating migration crisis, cut off service to migrants on Tuesday as European countries remained bitterly divided and confused over how to handle the thousands trekking northward.

While migrants were greeted early Tuesday by an announcement that the station was “shut down for departure and arrivals for an indefinite time” and told to leave, thousands of others were pouring into stations at the preferred destination for many of the migrants — Germany — and being greeted with promises of accommodations and a chance at legalized status.

The contrasting scenes in Budapest and Munich reflected a continent polarized by how to respond to a wave of migrants trying to reach wealthier countries in Europe.