STUART, Fla. — A Florida man fatally shot his pregnant wife after he thought he heard an intruder outside his bedroom door, according to WPBF.

The shooting happened just around 1:30 a.m. Wednesday in Stuart.

Martin County Sheriff William Snyder said the man called 911, telling dispatchers he accidentally shot his wife.

She was taken to a hospital where she died. The woman was six months pregnant, and doctors were able to save the baby, according to WPBF.

A 2-year-old child also in the home was not injured.

The sheriff says the man gave detectives a detailed account of what happened.

The Associated Press contributed to this report.