VISTA (CNS) - A man who broke into a pair of San Marcos apartments and committed lewd acts in bedrooms where young girls were sleeping was sentenced Tuesday to 32 years to life in state prison.

Dwayne Farrell, 25, was convicted in March of "hot prowl" burglary, committing a lewd act on a child and annoying or molesting a child.

Farrell was arrested on Feb. 17, 2014, hours after a break-in at an apartment complex in the 500 block of Rush Drive. Blood found near one of the apartments led police to Farrell, who lived about a half-mile away.

Sheriff's investigators said the blood was left behind when Farrell jumped from a second-story balcony and hit his head after the "brazen burglary."

Farrell entered a first-floor apartment through an unlocked sliding glass door about 5:15 a.m. and stood over the bed of a sleeping 7-year-old girl, rubbing her back. When Farrell noticed the child woke up, he ran out through the slider.

In another break-in 25 minutes later, a woman was sleeping in a separate bed next to her 8-year-old daughter in an apartment on the second-floor of the complex when she heard heavy breathing and found a man beside the bed.

Farrell escaped through a sliding glass door and jumped from the balcony, authorities said.