Bluetooth is a promising short-range wireless communication technology with the characteristics of interference resilience and power efficiency, both desirable for wireless sensor networks. The new Intel Mote sensor devices have Bluetooth technology incorporated as the standard wireless communications interface. When using Bluetooth in applications where multihop routing is required, groups of Bluetooth piconets combine together to form a scatternet. However, most of the existing scatternet formation protocols are designed to facilitate communications between any two pairs of devices, regardless of the actual traffic demand pattern. For wireless sensor network applications with low-duty-cycle traffic patterns, an on-demand scatternet formation protocol can achieve significant power saving by avoiding unnecessary network connectivity. To that end, we introduce an on-demand scatternet and route formation protocol designed specifically for Bluetooth-based wireless sensor networks. Our protocol builds a scatternet on demand, and is able to cope with multiple sources initiating traffic simultaneously. In addition, our energy-aware forwarding nodes selection scheme is based on local information only, and results in more uniform network resource utilization and improved network lifetime. Simulation results show that our protocol can provide scatternet formation with reasonable delay and good load balance, which results in prolonged network lifetime for Bluetooth-based wireless sensor networks.