The existing literature on ostracism in social dilemma games has focused on the impact of the threat of exclusion on cooperation within groups but so far, little attention has been paid to the behavior of the excluded members after their reintegration. This paper studies the effect of exclusion by peers followed by reintegration on cooperation once excluded individuals are readmitted in their group. Using a negatively framed public good game, we manipulate the length of exclusion and whether this length is imposed exogenously or results from a vote. We show that people are willing to exclude the least cooperators although it is not an equilibrium strategy. Exclusion has a positive impact on cooperation and compliance to the group norm of withdrawal after reintegration when exclusion is followed by a quick rather than a slow reintegration and that the length of exclusion is chosen by the group. In this environment, a quicker reintegration also limits retaliation. Post-exclusion cooperation and forgiveness depend not only on the length of exclusion but also on the perceived intentions of others when they punish.