(NBC News) — Danelo Cavalcante, the convicted murderer who spent two weeks on the run after a daring prison break, survived by eating watermelon from a farm and hiding his fecal matter and had planned a carjacking to flee the state, officials have revealed.

Cavalcante, convicted of killing his ex-girlfriend in front of her two young children, escaped Chester County Prison in Pocopson Township on Aug. 31. After two weeks of an exhaustive search, the 34-year-old was captured Wednesday morning.

After he was caught, Cavalcante confessed to investigators his plans to slip out of the country and divulged how he survived on the lam, Robert Clark, the supervisory deputy U.S. Marshal in the eastern district of Pennsylvania, said on NBC News’ Top Story with Tom Llamas Wednesday night.

“Early in the investigation he stated that he had found watermelons on a watermelon farm, and he was living off watermelon, he was drinking from the stream, he was moving at night only,” Clark said.

Read the full story on NBCNews.com.