This paper presents two weak partially synchronous system models M antiðnÀkÞ and M sinkðnÀkÞ , which are just strong enough for solving k-set agreement: We introduce the generalized ðn À kÞ-loneliness failure detector LðkÞ, which we first prove to be sufficient for solving k-set agreement, and show that LðkÞ but not Lðk À 1Þ can be implemented in both models. M antiðnÀkÞ and M sinkðnÀkÞ are hence the first message passing models that lie between models where V (and therefore consensus) can be implemented and the purely asynchronous model. We also address k-set agreement in anonymous systems, that is, in systems where (unique) process identifiers are not available. Since our novel k-set agreement algorithm using LðkÞ also works in anonymous systems, it turns out that the loneliness failure detector L ¼ Lðn À 1Þ introduced by Delporte et al. is also the weakest failure detector for set agreement in anonymous systems. Finally, we analyze the relationship between LðkÞ and other failure detectors suitable for solving k-set agreement.