NASHVILLE (AP) - Authorities say a Tennessee man has pleaded guilty to a federal charge after a toddler fatally shot a 7-year-old cousin.

U.S. Attorney Don Cochran says in a statement that 27-year-old Anthony Patrick Sanders admitted on Tuesday to being a convicted felon with a gun.

The statement says Harmony Warfield was shot Jun 6 in a Nashville apartment where three other children, ages 14, 11 and 2, were present. Authorities have said the 14-year-old reported the 2-year-old was holding the gun before the 7-year-old was shot in the head.

The statement says Sanders left the loaded gun where the children could access it, and after the shooting took the gun and fled the area. He was indicted eight days later.

The plea agreement calls for Sanders to serve 10 years in prison. Formal sentencing is set for March 2.

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