A 25-year-old Philadelphia man was sentenced on Wednesday to 13 years in New Jersey state prison for an armed home invasion in Medford Township during which he threatened a 19-year-old babysitter at gunpoint, Burlington County Prosecutor Scott Coffina said Thursday.

Shannon M. Soroka had pleaded guilty in July to robbery and related offenses for the March 31 incident. He held the babysitter at gunpoint while searching the home for cash. The woman put the child she was watching in a bedroom, and later escaped through a window and ran to a neighbor’s house to call police.

Investigators found that Soroka needed to pay off tens of thousands of dollars in gambling and drug debts. Soroka had participated in local poker tournaments, including at the Borgata Hotel in Atlantic City. The owner of the home was a professional poker player.