Related video: Suspect accused of shooting Maryland judge has ties to Tampa.

(AP) — A man suspected of killing the Maryland judge who ruled against him in a divorce case last week was found dead Thursday in a heavily wooded area not far from where the shooting unfolded, ending a weeklong manhunt that rocked the largely rural community.

Authorities believe Pedro Argote, 49, was angry about losing custody of his children when he shot and killed the judge. The Oct. 19 attack unfolded outside the home of Washington County Circuit Court Judge Andrew Wilkinson, who was shot in his driveway.

Hours earlier, Wilkinson had presided over a hearing in which Argote’s wife and daughter delivered emotional testimony about the abuse he inflicted upon them for years. Argote was not present at the hearing, which concluded with Wilkinson ruling against him and awarding his wife sole custody of their four children.

FILE – Officers with the Frederick County, Md., Sheriff’s Office SWAT Team search for suspect Pedro Argote at the former Garden State Tannery plant, Saturday, Oct. 21, 2023, in Williamsport, Md. Argote, the man suspected of killing a Maryland judge on Thursday, Oct. 19, was found dead on Thursday, Oct. 26, according to the Washington County Sheriff’s Office. Authorities believe Argote was angry about losing custody of his children when he shot and killed Washington County Circuit Court Judge Andrew Wilkinson, the judge who presided over his divorce case. (Ric Dugan/The Frederick News-Post via AP, File)

Law enforcement launched a search for Argote almost immediately after the shooting. They discovered his SUV in a wooded area in Williamsport, about 8 miles (13 kilometers) southwest of Hagerstown, where the judge was shot.

Authorities searched the area where the vehicle was found and concluded Argote wasn’t there. But officials said Thursday morning that they had returned to the area to conduct “additional evidentiary searches.” They said there was no safety concern.

Argote’s body was found in a heavily wooded area about a mile from the SUV, according to the Washington County Sheriff’s Office. They did not release a suspected cause of death.

In a statement Thursday afternoon, the Maryland judiciary praised the work of law enforcement and asked for privacy on behalf of Wilkinson’s family.

“We continue to grieve the loss of our colleague and friend while supporting the Wilkinson family, the judges and staff of the Circuit Court for Washington County, and the entire Hagerstown and broader Washington County community,” the statement said.

The sheriff’s office said there will be a news conference at 3 p.m. with updates on the case.

A funeral for Wilkinson, 52, is scheduled for Friday morning in Hagerstown.

During testimony at the hearing last week, Argote’s relatives said he controlled every aspect of their lives, keeping them isolated and subjecting them to various acts of violence in recent years.

Wilkinson said he found Argote “abusive in multiple ways.”

The recent divorce hearing lasted two days. During the first half, which took place Sept. 26, Argote represented himself. He at times expressed frustration, but his voice remained calm and he often addressed the judge respectfully as “your honor.” Argote failed to appear for the second half of the hearing last week. Instead, he called the courthouse saying he had a headache.

The judge ruled out visitation rights and barred Argote from contacting his children or visiting the family’s house.

Hours later, authorities say, he showed up in Wilkinson’s driveway.

The circuit court judge was a longtime resident of Hagerstown and heavily involved in the community. The city of nearly 44,000 lies about 75 miles (120 kilometers) northwest of Baltimore in the panhandle of Maryland.