Timing of reproduction and clutch size are important determinants of breeding success, especially in seasonal environments. Several recent bird population studies have shown changes in breeding time and in natural selection on it. These changes have often been linked with climate change, but few studies have investigated how the traits or natural selection are actually connected with climatic factors. Furthermore, the effect of population density on selection has been rarely considered, despite the potential importance of density in demographic processes. We studied variation in natural selection on laying date and on clutch size in relation to measures of spring phenology and population density in a long-term study of pied flycatchers in SW Finland. The phenological stage of the environment at mean egg-laying did not affect the direction of selection on either laying date or on clutch size. There was, however, stronger selection for earlier laying date when the breeding density of the population was high, suggesting that early breeding is not necessarily beneficial as such, but that its importance is emphasized when high population density increases competition. In addition, early breeding was favoured when the pre-breeding period was cool, which may indicate an increased advantage for the fittest individuals in harsher conditions. In the middle of the twentieth century, there was selection for large clutch size, which subsequently ceased, along with an overall decrease in recruit production. Our results indicate that attention should be paid to demographic factors such as breeding density when studying natural selection and temporal changes in it.