A man was fatally shot while trying to break into a home Tuesday night in the Gage Park neighborhood on the South Side, police said.

The man, thought to be in his 40s, was trying to break into a home in the 5700 block of South California when he was shot by a resident, according to Chicago Police. He then ran away.

Officers responding to a call for the burglary at 10:17 p.m. arrived to find the man lying in the backyard with a gunshot wound to the neck, police said. He was taken to Christ Medical Center, where he was pronounced dead.

The man, who has not been identified, died of a gunshot wound to the head and his death was ruled a homicide, the Cook County Medical Examiner’s Office said following an autopsy Wednesday.

Area Central detectives were investigating.

<a href=”https://graphics.suntimes.com/homicides/“><img class=”aligncenter size-full wp-image-1121797″ src=”https://suntimesmedia.files.wordpress.com/2018/05/banner.jpg” alt=”Homicides┬áin 2018 Database” width=”720″ height=”100″ /></a>