1,172. A First-Born Donkey

178:1 If a Jew has a donkey that gives birth to a firstborn male, he is commanded to redeem it. One redeems it with a lamb of sheep or a kid of goats. This sheep or goat can be male or female, large or small, blemished or unblemished, just so long as it is kosher, not yet slaughtered, and was not delivered after its mother was slaughtered. This sheep or goat is given to a kohein. The owner is required to redeem the donkey from the time it's born until it dies, but the mitzvah is to redeem it immediately so as not to delay fulfilling the commandment. After the donkey is redeemed, the owner may keep it and it is completely unsanctified. The sheep or goat that the kohein received is likewise not consecrated.

178:2 As soon as one has put aside the sheep or goat that will be given in lieu of the firstborn donkey, the donkey becomes de-sanctified, even before giving the sheep or goat to the kohein. Therefore, immediately upon putting the sheep or goat aside, one recites the bracha "Who sanctified us with His commandments and commanded us to redeem the first-born donkey."