Rosario Socope, a Guatemalan immigrant in the country illegally, had an unwelcome surprise waiting for her when she attended a pretrial hearing on a felony charge at a courthouse in Brooklyn this month. As she stepped out of the courtroom into a public hallway, she was approached by immigration agents seeking to deport her. As her husband, her social worker and one of her lawyers looked on aghast, the agents hauled her away. The encounter was only the most recent in a long series of such cases across the country that immigrant advocates and politicians say have spread fear of...