This study examined the longitudinal relations between competence (academic achievement and social preference) and problem behavior (loneliness and aggression) in 741 elementary school boys and girls in the Netherlands (Grades 1-5). Also, we examined the moderation effects of having no friends, aggressive friends, or nonaggressive friends on the associations between competence and problem behavior. Results revealed that competence was related to later problem behavior. Academic competence was related to lower levels of later loneliness, whereas social preference was related to both lower levels of loneliness and aggression over time. Vice versa, loneliness was not related to subsequent competence, whereas aggression was associated with later lower levels of social preference. Although group differences appeared on mean levels of competence and problem behavior, with children without friends being especially vulnerable to maladjustment, we found no moderation effects of friendship for associations between competence and problem behavior.