In South-East Asia, huge swarms of fireflies synchronously emit light flashes to attract mating partners. The underlying principle can be used to implement a robust and scalable distributed synchronization approach in wireless sensor networks. This paper describes the adaption of this principle for wireless sensor networks using battery-powered low-cost nodes based on an off the shelf IEEE 802.15.4 MAC layer in order to establish a global notion of time. This global notion of time is the basis for a wireless time-triggered network protocol, but also provides a service that can be used by real-time applications. The time-triggered behavior enables the implementation of an energy-efficient protocol, where sender and receiver units can be turned off during silent phases. The approach is evaluated by simulation and a real world case study using AVR R Z-LinkTM802.15.4/ZigBee nodes. Results exploring various network topologies, parameter choices, and realistic clock source deviations show t...