Early experiences may alter later behavioural expressions in animals and these differences can be consistent through adulthood. In dogs, this may have a profound impact on welfare and working ability and, it is therefore interesting to evaluate how experiences during the first weeks of life contribute to shaping the long-term behaviour. We analysed data from 503 dogs from 105 litters, bred at the Swedish Armed Forces Dog Kennel. For each dog, the data comprised information on dam and sire, sex, litter size, sex ratio of litter, date of birth, and weight at birth, and at 10 days of age. Between the ages of 377 and 593 days, the dogs were tested in a temperament test, assessing their suitability as working dogs. The behaviour test comprised 12 different sub-tests, and was scored on a behavioural rating scale. A principal component analysis showed that the test performance could largely be attributed to four principal components (explaining 55.7% of variation), labelled Confidence, Physical Engagement, Social Engagement and Aggression. We analysed the effects of the different early life variables and sex on the principal component scores (PC scores) using linear modelling. PC scores on Confidence were affected by parity, sex and litter size, and Physical Engagement was affected by parity, growth rate, litter size and season of birth. Social Engagement was affected by growth rate and sex, and Aggression was affected by sex. Some of these effects disappeared when they were combined into a single linear model, but most of them remained significant also when controlling for collinearity. The results suggest that the early environment of dogs have long-lasting effects on their behaviour and coping styles in a stressful test situation and this knowledge can be used in the work with breeding of future military or police working dogs.