PARIS, Maine — A Stoneham man admitted Wednesday in Oxford County Superior Court to nearly shooting his neighbor by accident while firing his rifle at squirrels on his bird feeder.

Randall Millett, 43, pleaded guilty to reckless conduct. He received a one-year deferred disposition, after which he can plead to a lesser charge instead.

According to Assistant District Attorney Joseph O’Connor, a deputy from the Oxford County Sheriff’s Office received a call on June 27, 2012, that a resident had been shot at from the direction of his neighbor’s house. The man said he’d heard gunshots and went outside where a bullet zipped past him and hit a tree about 6 feet away.

The deputy went to the complainant’s neighbor, Millett, who immediately admitted he’d been shooting a .22-caliber rifle at red squirrels that had taken over his bird feeder. O’Connor said Millett was “very forthcoming” and “very apologetic.”

“He knew he shouldn’t have been firing in that direction,” O’Connor said Wednesday.

The conditions of Millett’s deferred disposition include no contact with his neighbor and no gun ownership.