We tested the hypotheses that the distance bats fly from tree lines depend on food abundance and protection from wind. We monitored the activity of pipistrelle bats (Pipistrellus pipistrellus) and measured insect abundance and wind speed and direction at fixed distances up to 50 m from tree lines. We compared bat behaviour in different situations: with and without wind and with low and high insect abundances in adjacent open areas. In all situations, pipistrelle bats' activity decreased with increasing distance from the tree line. Within nights, we found no effect of wind speed on bat activity (sound recorded per 5 min) on the leeward side of the tree lines. Between nights, however, bats concentrated their activities closer to the tree lines at high wind speeds or angles of incidence of wind from 45°to 90°. A significant relationship between bat and insect abundances was found only when the tree line was bordered by insect-rich grassland. Since wind and insect abundance only partly explained the distances bats flew from tree lines, two alternative explanations, namely predator avoidance and the use of tree lines as acoustic landmarks, are discussed. Pipistrelle bats using a double row of trees as a commuting route at dusk flew mainly between the tree lines, regardless of insect abundance or wind speed. It is argued that predator avoidance explains this behaviour, being a constraint on movements of bats at relatively high light levels. At high wind speeds and angles of incidence greater than 45°, the proportion of pipistrelle bats commuting on the leeward side of the tree lines increased.