The goal of this paper is to find the requirement and security issues of wireless sensor networks (WSNs) especially in coal mines for safety monitoring and to develop an authentication protocol to provide the security in WSNs. The WSNs help in reducing the hazard and increase the productivity by proper moni- toring the equipments and underground conditions. In mines, a sensor in a WSN senses the environment and transmits the data to colliery professionals for further detailed assessment as a minor factual er- ror may cause severe human casualties and large resource destruction that may lead to huge monetary losses. The sensors have limited battery that should be used efficiently in computing the acquired infor- mation. In this paper, we present an authentication protocol to overcome the security issues in WSNs by authenticating the users (professionals) and the mechanical sensors. Our protocol requires only light weight functions and low cost in transmission of the messages to save the battery in sensors. We use the BAN (Burrows-Abadi-Needham) logic to ensure the mutual authentication and session key agreement properties. The formal security analysis proves its resilience against various security attacks. For its for- mal security verification, a widely accepted AVIPSA (Automated Validation of Internet Security Protocols and Applications) tool is used.