“I got to the embassy this morning and they said, ‘You are Cuban? You can’t pass. That program is frozen,’” Dr. Monges, who had been working in Venezuela, said in a phone interview. “I am stranded here in this country.”

The number of Cubans leaving for America has surged since the two governments resumed relations in late 2014, in expectation that the policy — known as “wet foot, dry foot” because those caught at sea were sent back but those who made it to dry land were allowed to stay — might end.

A senior official with the Department of Homeland Security, who spoke on the condition of anonymity in keeping with agency policy, said the administration decided to end the program immediately to prevent a mass exodus that would risk lives at land and sea.

In Cuba, the abrupt change seemed to further divide people along generational lines. Many older Cubans said the decision was a just one that would halt the steady drain of the nation’s citizens — especially educated ones like doctors — to America. One man, selling copies of the state-published newspaper Granma on the street, said the measure was necessary to stop “undermining the Cuban government” by enticing people to “throw their fates to the sea.”

But younger Cubans, for whom the prospect of a life in America offers a glimmer of hope amid economic hardship, were crushed, forced to envision a future with fewer options.

Cuban identity, and pride, is in no small part forged by its relationship with the United States, both in the tiny country’s defiance of its bigger neighbor and then in the unique privileges afforded to those who fled and made it to America. To be suddenly placed on equal footing with the millions of others around the world hoping to do the same was an especially hard fall.

In Havana, where until recently the internet has been out of reach for most ordinary Cubans, the city’s relatively new Wi-Fi parks have become stations of despair following the announcement. For a nation robbed of connectivity for more than a decade, the sudden surge of digital news — through email, messaging and social media — seemed like a particularly cruel way to find out their special treatment had ended.