The gemara Gittin 38a tells us that one who frees an eved kna’ani violates a mitzvas aseh of l’olam bahem ta’avodu. Assuming this is a real derasha and not an issur derabbanan (as most rishonim hold), how is it that we do find cases where a slave may be freed? The Mishna itself tells us that in a case of a chatzi eved chatzi ben chorin, e.g. a slave owned by to masters who was freed by one and is now caught in between being a slave or a full yisrael, there is a mitzvah on the second owner to free the slave. The gemara Brachos 47b also tells us that R’ Eliezer freed his slave to make a minyan – how could that be permitted? The gemara in Brachos asks this very question and answers that a mitzvah is different, i.e. freeing a slave for purpose of fulfilling a mitzvah is permitted. The gemara continues and asks isn’t this mitzvah a mitzvah haba’ah b’aveira, and answers that “mitzvah d’rabim” is different and overrides the aveirah. Tosfos in Gittin uses this same concept to explain freeing the chatzi eved – in the state of half-eved the person cannot fulfill peru u’revu, which is a fundamental mitzvah, and therefore the greater mitzvah overrides the issur of freeing the eved. However, the Ramban in Gittin suggests a completely different approach. According to Ramban, the mitzvah of freeing a slave is patterned after the issur of ‘lo techaneim’, not giving a free gift to a non-Jew. Yesterday’s comments by anon1 suggested that the benefit received by the master by the slaves years of hard work render his release not a free gift, but a gift in exchange for services provided. If this is what the Ramban meant, the problem is (as asked by the Magen Avraham and Turei Even) why does the gemara in Brachos need to invoke the idea that the slave of “mitzvah d’rabim” to obviate the problem of mitzvah haba’ah b’aveirah– as long as the release is not a free gift there is no issur?! It seems that a release on the basis of past service provided is not sufficient – there has to be some pressing need to release the slave into freedom, a need like “mitzvah d’rabim” which is strong enough to override the prohibition. The disagreement between Tosfos and the Ran is whether that need is doche “l’olam bahem ta’avodo”, or is the issur of releasing the slave “hutra” because it is no longer a free gift.
Returning to the original question of how Avraham could give matanos to the children of the pilagshim, the gemara in Sanhedrin asks what these matanos were and answers that they were the magical “shem tumah”. The Margolias haYam in Sanhedrin quotes a source as saying the reason the gemara asked what the matanos were and did not take the word at face value (as meaning some type of presents) is precisely because of this issur of “lo techaneim”! I don’t get the punchline, and the Margolias haYam does not explain further – does “lo techaneim” only apply to concrete gifts and not to abstractions like a “shem tumah”?