Ad hoc wireless sensor networks (WSNs) have attracted a great deal of attention in recent years for their broad potential in both military and civilian operations. The proper operations of many WSNs rely on the knowledge of physical sensor locations. However, most existing localization algorithms developed for WSNs are vulnerable to attacks in hostile environments. As a result, adversaries can easily subvert the normal functionalities of location-dependent WSNs by exploiting the weakness of localization algorithms. In this paper, we first present a general secure localization scheme to protect localization from adversarial attacks. We then propose a mobility-assisted secure localization framework for WSNs.