We investigate leading by example in a public goods game in scenarios with and without intergroup competition. Leading by example is implemented via a sequential decision protocol. We examine both one-shot and repeated interaction and make use of the strategy method to characterize followers’ conditional responses to the leader’s contribution. The results show that only follower but not leader behavior is affected by the introduction of intergroup competition. The change in follower behavior is best described as an increase in cooperation which is not conditional on the leader’s decision. When groups interact repeatedly, we do not find that leading by example is able to foster cooperation by itself. It only significantly improves contributions when it is accompanied by intergroup competition.