The California mom who fought off a deranged attacker while changing her baby in the bathroom of Macy’s Herald Square was going off “a mom’s instinct,” a family friend told The Post.

“I’m not surprised she did that,” the friend, Justine Silva, said.

“She works out. She’s pretty fit,” Silva said of the brave mom, who was stabbed in the back, shoulder and arm in the Thursday incident.

A California mom, 38, was brutalized by a deranged attacker while changing her baby in the bathroom of Macy’s Herald Square. Obtained by NY Post

Kerri Aherne, the alleged attacker accused of stabbing a tourist inside a bathroom at Macy’s Herald Square, is arraigned at Manhattan Criminal Court on Friday, Dec. 12, in New York. James Keivom/Pool/ New York Post

The mom and her family were supposed to leave NYC the day after the attack but are now stuck in the Big Apple with no clear date of return, Silva added.

“It was a holiday thing,” Silva, a high school girls soccer coach who knows the family through her boyfriend, said of the couple’s trip to New York.

“They just had the baby not too long ago and they were just trying to get [away] on holiday. This is their first trip to New York since they had the baby.”

The baby is the couple’s only child, and concern for the infant was immediate after word of the horrifying incident spread through the family, Silva said.

“I was concerned for her. I was worried that she might’ve been hurt,” Silva said, describing the 10-month-old as “really calm” and sweet.

The randomness of the attack made it especially jarring, Silva said, because of how close she is to the family.

“There are so many people in this world and it just happened to be her — someone that I know,” she said. “The family is a very tight-knit family.”

Silva said she briefly connected with the baby’s father after the attack and described him as exhausted.

The mom and her family were supposed to leave New York City the day after the attack but are now stuck in the Big Apple with no clear date of return, family friend Justine Silva told The Post. Desheania Andrews for Ny Post

“They just had the baby not too long ago and they were just trying to get [away] on holiday. This is their first trip to New York since they had the baby,” Silva continued. James Keivom

“He probably was up all night and it was stressful for him,” she said. “That’s his only child. He is an amazing dad.”

“I’m happy that she’s gonna be okay,” Silva added.

The suspect, Kerri Aherne, 43 – who was released from a psychiatric facility the morning of the attack – has been charged with attempted murder, assault, child endangerment and weapons possession in the disturbing incident.

Prosecutors said Aherne purchased the knife inside Macy’s before allegedly targeting the unsuspecting mother. 

Aherne, who authorities said has a history of mental illness, allegedly confessed to authorities that she heard voices in her head telling her to kill, prosecutors said.

Online trolls later flooded what appeared to be Aherne’s Facebook page — where she had previously made anti-Trump comments — with vitriolic, politically charged comments after news of the stabbing spread.

“Kerri Aherne we hope everything in the world bad happens to you and only you. Your mom and dad are the pathetic ones here,” one user wrote.

“Your insanity caught up to you. If you hate America, you’ll love prison,” another added.