Emergency situations in mines result in loss of precious human lives. In this thesis we discussed architecture of a Wireless Sensor Network (WSN) that can be deployed in mines, which takes care of severe geographical and environmental constraints found inside mines. The proposed architecture is a two-level hierarchy of small sized WSNs that employs a wireless Mesh network as the backbone connecting small sized WSNs scattered inside mines. We proposed a routing protocol for that WSN that is optimized for both emergency and non-emergency data routing.Since our main goal is to provide safety in the mining environment, the main consideration of the routing protocol is to provide reliability and reduce the end-to-end delay for vital emergency traffic while optimizing for network longevity for non-emergency traffic. We present a new cost-based routing protocol called MDML, which provides Minimum Delay and Maximum Lifetime routing for such networks. The proposed MDML routing defines separate cost metrics for emergency and non-emergency traffic. It finds the least-cost path for the reliable delay-constrained emergency traffic with regards to link error rate but also gives secondary consideration to nodes' residual energy. It is an energy efficient routing scheme for non-emergency or regular data traffic routing that maximizes the network lifetime.However, for emergency traffic energy efficiency is compromised to achieving minimal delay. Regular traffic is generated through periodic monitoring and is delay-insensitive. For regular traffic delivery, a shortest path routinig algorithm is employed which uses link costs that reflect both the communication energy consumption rates and the residual energy levels at the two end nodes. Simulation results show that using the proposed emergency routes reduces the end-to-end delay for emergency traffic. The effect of protocol update cycle on increasing the network lifetime is verified true simulation. MDML is also compared with a simulated non-MDML approach to compare the lifetime and delay performance. Simulation results have demonstrated the effectiveness of our approach.