A 78-year-old northern New Jersey man on trial for fatally shooting a bear and her two cubs was defending his wife and himself, he and his attorney said Monday.

(JHWilliams, Thinkstock)

Robert Ehling, of Sparta, is charged by summons with killing the three bears out of season. He appeared Monday in Andover Joint Municipal Court.

His attorney, George Daggett, told NJ.com that Ehling told police that the mother was scratching at a sliding door and was attracted to a 40-pound bag of bird seed inside.

Robert Driscoll, a conservation officer for the state Division of Fish and Wildlife, testified that there were no signs the bears were trying to get into the home and no damage to the door.

It happened Oct. 16, 2014 when Driscoll was brought to Ehling's home by police.

"He said he shot it because it was on his deck," Driscoll testified.

Ehling told Driscoll the bear was more than 21 feet away when he fired his first shot and less than 11 feet away after he advanced and fired a second, final shot, Driscoll said.

Ehling also shot the two cubs, Driscoll said.

Ehling acknowledged putting out birdseed, which bears also like eating, the conservation officer said.

Two neighbors testified they were fearful because Ehling had been seen carrying a gun on his property on a few other occasions.

One neighbor, Barbara Stote, added that bears were also a common sight.

"There are always bears in our neighborhood walking around," Stote said.

The trial will resume on Dec. 14, two days after New Jersey's bear hunting season ends.

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)