UPPER MARLBORO, Md. (AP) — A man who shot his wife and tried to shoot his son and sister-in-law has been sentenced to 50 years in prison.

Edward McRavin was sentenced Friday in Prince George’s County Circuit Court for a shooting outside the Family Crisis Center on Mother’s Day two years ago. He pleaded guilty to attempted murder and assault.

READ MORE: Bacteria Levels Prompt Recreational Water Advisory At Cox's Point Park

Prosecutors say McRavin, 51, rode to the center on a bicycle and opened fire on his wife, son and sister-in-law. The only shot he fired before his gun jammed struck his wife in her upper body.

READ MORE: Star Spangled Celebration: Fourth Of July Fireworks Light Up Baltimore's Skyline Once Again

Prosecutors say that at the time of the shooting, McRavin’s wife had received a protective order against him, and McRavin’s visitation rights entitled him to see his son every Sunday under the supervision of the Family Crisis Center.

MORE NEWS: BWI Fares Well Amid Mass Flight Delays, Cancellations Over Holiday Weekend

(Copyright 2013 by The Associated Press. All Rights Reserved.)