Protection is a continuous ability that functions at the moment damage is actually assigned and dealt. Under CR 614.1, protection prevents damage from sources with the relevant quality. Crucially, the timing of when protection was gained does not matter — what matters is whether it is active when damage assignment occurs (CR 702.16b).
Combat damage assignment happens in the combat damage step (CR 510.1). If a creature gains protection from a relevant source after blockers are declared (CR 509) but before the combat damage step, that protection is fully in effect during damage assignment. The attacking or blocking creature with protection simply cannot be assigned damage by the source it is protected from.
It is worth noting that the block itself still stands — protection does not retroactively remove a creature from being a legal blocker. The creature remains blocked (CR 702.16d only prevents damage, enchanting/equipping, blocking, and targeting going forward). So an attacking creature that is blocked stays blocked (unless it has trample or similar), it just cannot assign damage to the protected blocker.
Example: You attack with a Red 3/3. Your opponent blocks with a White 2/2, then at the end of the declare blockers step casts a spell giving their 2/2 protection from red. In the combat damage step, your 3/3 cannot assign any combat damage to the 2/2 — all potential damage is prevented. Your 3/3 is still considered blocked, so it deals no damage to the opponent either (assuming no trample).
Citations: CR 510.1 governs when combat damage is assigned; CR 702.16b defines what protection prevents; CR 614.1 explains how prevention effects apply continuously.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.