The legend rule is governed by CR 704.5j: whenever a player controls two or more legendary permanents with the same name, that player chooses one and puts all the rest into their graveyard. This happens as a state-based action, which means it is checked immediately after any game event, before any player receives priority.
Importantly, the player who controls the duplicates chooses which copy survives — it does not have to be the newer or older one. The unchosen copies are put directly into the graveyard; they are not destroyed, so indestructible does not prevent this (CR 704.5j does not use the word 'destroy').
This check is performed simultaneously with all other state-based actions (CR 704.3). If both copies arrived at the same time (e.g., via a mass-blink effect), the same rule still applies: the player picks one to keep.
Example: You control Thalia, Guardian of Thraben and cast a second copy. The moment the second Thalia enters the battlefield, before anyone can respond, state-based actions are checked. You choose which Thalia to keep; the other is immediately put into your graveyard. Your opponent cannot respond to the 'dying' Thalia because this happens before priority is passed.
Note that the legend rule applies per player separately (CR 704.5j). If your opponent also controls a legendary permanent with the same name, neither player is forced to sacrifice theirs — only a single player controlling two or more copies triggers the rule.
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.