Republicans accused the mayors of New York, Chicago, Denver and Boston of providing sanctuary to criminals, while Democrats pointed to falling crime rates and defended helping the needy.