Josephine Fanning was shot dead by a 4-year-old boy at her home in Lebanon, Tennessee (Courtesy of WSMV)

A 4-year-old boy snatched a gun from a US deputy sheriff during a family barbecue and shot the officer's wife dead.

Authorities said Wilson County Deputy Daniel Fanning, 51, was showing off his guns to friends at his home seven miles south of Lebanon, Tennessee, when his wife Josephine, 48, entered the room with the child.

The kid grabbed a loaded gun, which was on show on top of the bed, and the weapon went off, the Tennessee Bureau of Investigation spokeswoman Kristin Helm said.

The shot hit Josephine, who was later pronounced dead at the scene.

"Within seconds this small 4-year-old comes into the room, unbeknownst to the officer, and just picked up the gun and shot her," said Fanning's boss, Wilson County Sheriff Robert Bryan.

The child was reportedly a relative of the Fannings, who had invited some relatives and friends over for a cookout during the weekend.

Authorities said the gun that went off was Fanning's personal weapon and not his service one.

"Nobody is immune to this - nobody. It doesn't matter if you are a law enforcement officer. These things can happen in seconds," Bryan told local WSMV channel.

Josephine and Daniel Fanning had been married for about a year.

"Danny Fanning is going to have to live with it. Our prayers, our thoughts go out to him and the child," Bryan added.

Authorities are investigating the case but no charges have been filed. "[It] appears accidental at this time," Helm said.

Of the 31,000 Americans who die of gunshot wounds each year, about 600 are killed in accidental shootings, according to the National Centre for Injury Prevention and Control statistics.