The emergence of reciprocally beneficial cooperation