Eleven-year-old Xochil Garcia kept herself ready for the worst, constantly rehearsing in her mind how she could escape an attacker or kidnapper.

Little did she know her hours of mental preparation would pay off – possibly saving the Brooklyn girl’s life.

Last night, the 4-foot-5, 80-pound sixth-grader was hailed as a hero for fighting off an attacker twice her size – then having the wits about her to help capture the suspect.

“I always make my plan before there’s a robbery or a kidnap[ping],” Xochil said from her Midwood home. “I think of a plan, like, if anybody kidnaps me, kick them back or scratch them – I’m growing my nails out. I went with Plan B.”

Plan B meant yanking backward with all her might as Bernard Mutterperl, 19, allegedly grabbed her in her apartment stairwell Sunday, dragged her into the lobby and tried to take her to another set of stairs leading to the roof…

…Xochil, who called for her attacker to get a stiff sentence, warned other kids to think safety first. “Try to figure out a plan before somebody tries to kidnap you. That way if somebody tries to touch you, you’re ready to attack them back.

After the kidnapper attempted to escape, Xochil still didn’t go gently into the good night. She helped friends and family identify and catch him, leading to his arrest.