By Joe Vazquez

SAN JOSE (CBS SF) — In a bizarre attack at a San Jose Walmart on Wednesday, a woman was arrested after she allegedly beat a 4-year-old girl and her father with a crowbar, according to police.

The 20-year-old suspect entered the store on Story Road shortly before 11 a.m. for no apparent reason, said Lt. Jason Dwyer.

READ MORE: Emeryville Tax Preparer Accused Of Filing Dozens Of Fraudulent Returns, Teaching Fraud In 'Tax School'

A girl was with her dad riding in the shopping cart through the purse section when police said the attacker suddenly came out of nowhere and struck the girl at least twice in the head.

Dwyer said the homeless woman, 20-year-old Maria Garate, tried to hit the girl again but the father jumped in and was able to stop her. He took some hard hits as well.

“If someone was attacking my daughter not much would keep me from trying to stop that attack,” Dwyer said. “I think the father did what any father would do … he intervened and was able to stop the attack … I know he did it out of love, but it was heroic.”

Walmart security tackled the woman to ground and detained her until police arrived.

READ MORE: Liana Wallace On 'Survivor' All-Black Alliance Falling Apart: 'Just Wanted Us To Make Top 8, Then We Can Have World War II''

Police arrested Garate on suspicion of assault with a deadly weapon, Dwyer said.

The girl was taken to a hospital with injuries that were not thought to be life threatening.

An employee told KPIX 5 that while Garate was subdued, she yelled out that the girl deserved it.

EDITORS’ NOTE: Garate was originally reported to be 18 years old, but later authorities corrected her age, and reported her as 20 years old.

MORE NEWS: Man Wins $1 Million On Scratch-Off Lottery Ticket Gifted To Him After Heart Surgery