A heat-seeking plane flew overhead as tactical teams on the ground tightened their perimeter around the suspected whereabouts of Danelo Cavalcante, a convicted killer who came to the U.S. illegally while suspected of another murder in his home country of Brazil.
The plane, piloted by the U.S. Drug Enforcement Agency to assist Pennsylvania State Police and Border Patrol agents on the ground, picked up a heat trail with its FLIR imaging technology around midnight, according to Lt. Col. George Bivens.
It's a scenario the DEA has drilled for decades with drug smugglers in mind.
But lightning storms blew in, forcing the plane to depart after first pinging the suspect's location, Bivens said.
So, police and Border Patrol agents set up their perimeter, keeping their unwitting prey penned in until the weather cleared.
"Tactical teams made a decision to secure that area, that smaller area, as best they could and hold it through the storm until we could bring additional resources in and bring aircraft back overhead to ensure that we did not have an issue with an escape," Bivens explained.
Around 8 a.m. Wednesday, the manhunt came to a close as officers encircled Cavalcante in brush.
"They were able to move in very quietly," Bivens said. "They had the element of surprise. Cavalcante did not realize he was surrounded."
He tried to crawl away when he realized they were right on top of him, Bivens said.
So law enforcement released two K-9s — one from Customs and Border Patrol's elite BORTAC unit, another from the Special Emergency Response Team of the Pennsylvania State Police.
The K-9 involvement came a week after Loki, a state police dog, was rushed to a veterinarian for heat-related illness during the grueling manhunt.
Bivens declined to identify the dogs who assisted in the operation that led to Cavalcante's capture Wednesday morning.
BORTAC agents are members of an elite Border Patrol unit based in El Paso skilled at apprehension. They played a critical role in the capture of the escaped inmates in the Dannemora prison break in New York in 2015 and bringing the mass shooter in Cleveland, Texas, into custody earlier this year.
One of the dogs bit Cavalcante so hard on the head, aerial video showing police emerge from the forest with him in handcuffs showed a stream of blood down his face.
Cavalcante's injuries were not serious, Bivens said, and no officers were hurt.
Cavalcante had nothing on him but the clothes on his back and a stolen rifle.
Police announced the arrest about an hour later at a nationally broadcast news conference.
Over the past two weeks, police received numerous reports of possible sightings and images showing Cavalcante slinking around in the dark. Those images showed he'd shaved his beard and changed his clothes. Police eventually cornered him in the area of Coventryville Road, home to several farms, a kennel and a school.
Investigators do not believe Cavalcante received any outside help.
After his arrest, he reportedly told authorities that search teams had nearly stepped on him. He stole fruit from a watermelon patch, drank stream water and buried his own human waste to conceal his trail, according to Philadelphia's WPVI-TV.
By around 2 p.m. Wednesday, after being treated at a hospital, Cavalcante arrived at a jail in Avondale, Pennsylvania, barefoot, handcuffed and wearing a hospital gown. He will be transferred to a state prison to serve out a life sentence for the 2021 murder of his ex-girlfriend, Deborah Brandao.
He is also suspected of killing a man in Brazil in 2017. According to PBS News, Brandao's discovery of his potential involvement in that case led to her murder.
The manhunt that ended Wednesday is not the first Cavalcante has been involved in. After killing Brandao, he hit the road and was captured by police in Virginia, according to FOX 29 Philadelphia.
His escape put the community on edge, especially after he began breaking into area homes to steal supplies. He stole food and clothes and changed his appearance.
In one incident, he stole a gun and allegedly exchanged fire with a homeowner before fleeing back into the woods.
Authorities shut down local schools and urged residents to lock their doors and stay inside.
One former resident told Fox News Digital she was happy circumstances had forced her and her husband to move away last year.
"Thank you God for pushing us out, moving us down South, and we're not there anymore," she said. "Thank God the patriots that do live there, they are locked and loaded, and they’ve got guns."
Helicopters overhead broadcast an audio recording of Cavalcante's mother pleading for him to surrender.
"No escaping the infrared," said David Katz, the CEO of Global Security Group and a longtime DEA agent whose tactical team practiced FLIR drills in the 1990s.
Fox News' Griff Jenkins contributed to this report.