KUALA LUMPUR, Malaysia  When his turn comes to stand watch, Kang Long posts himself at a window, peering into the dark streets outside the tiny apartment where his fellow migrant workers sleep 10 to a room.

“We always fear, especially at night,” he said. “Maybe there will be a raid. Where will we run? I worry for my wife and children. I’ve been thinking of moving to the jungle.”

Mr. Kang Long, 43, is an ethnic Chin refugee from Myanmar, one of as many as three million foreign workers whose labor on farms, factories and construction sites and in service industries supports the economy of this bustling Southeast Asian nation. About half are estimated to be here illegally.

Like foreign workers elsewhere, they are resented by many local people and demonized by politicians. Here in Malaysia they have become the targets of an expanding campaign of harassment, arrest, whippings, imprisonment and deportation.