SAN JOSE, Costa Rica — Crime and joblessness have long been part of the tough Leon XIII neighborhood of Costa Rica's capital, where residents such as Alexandra Martinez do their best to steer clear of broken pavement and street-corner drug dealers. But the 37-year-old homemaker says that things have gotten worse in the last few years. Her explanation: "There are a lot of Nicas here," she says, using a slang term for Nicaraguans. Martinez says these immigrants, many of them undocumented, are hard-drinking, aggressive people who compete with Costa Ricans for jobs and drain the nation's public services. She approves...