A woman stabbed her neighbor's loose pit bull after it got into her backyard in Rylie and began attacking her son, WFAA-TV (Channel 8) reported..

The incident occurred Wednesday afternoon at Elizabeth Kilgore's house on Kempwood Lane, near Kleberg Elementary School, the station reported.

After biting through a gate, the dog jumped on Kilgore, taking her by surprise. Her son, Cody Kilgore, heard her screams and came outside to help. The dog bit him, trying to get at his neck, she said.

Cody Kilgore (via Facebook)

"I told someone, 'Dude, get something and just stab the dog,' to go ahead and get it and kill it because it was not going down without a fight," her son told WFAA.

Elizabeth Kilgore grabbed a knife and stabbed the dog.

"He was hurting my kid," she said. "I didn't know what to do."

Cody Kilgore is recovering from bites and injuries to his leg and foot.

The injured dog ran into the neighborhood, prompting police to urge the nearby elementary school to stay indoors until it was contained, a Dallas ISD representative told the TV station.

The animal, a pit bull, was found a few blocks away; Dallas Animal Services staff confirmed it had died. The dog's owners were put on notice.

"People, if you can't take care of your dogs, please don't get one," Elizabeth Kilgore said.

The Dallas City Council recently came together to support a plan that consultants say could solve the loose dog problem. The crisis reached a boiling point in May when a woman died after being bitten more than 100 times by a pack of dogs in southern Dallas.

Staff writer Tom Steele contributed to this report.