A Marine deserter, accused of gunning down his mother’s boyfriend, was captured Wednesday in Virginia — at the scene of the alleged slaying — following a two-week, multi-state search, authorities said.

Cpl. Michael Alexander Brown, 22, was safely taken into custody at his mother's house in Hardy, Virginia, at about 8 a.m. ET, Franklin County Sheriff W. Q. "Bill" Overton Jr. told reporters.

"This has been an intense manhunt for the past 18 days, covering three states," Overton said. "I am thankful this situation has come to a successful closure with no injury to the public or law enforcement personnel."

Michael Alexander Brown. FBI

Authorities did not immediately reveal how long Brown had been at that house or who might have been there when he first arrived.

Investigators "received information that had us refocus on the Hardy, Virginia residence," said Brad Sellers, acting U.S. Marshal for the Western District of Virginia.

"We were able to make contact with Mr. Brown this morning and take him into custody without any injury."

Michael Alexander Brown was taken into custody in Franklin County, VA without incident. The Franklin County Sheriff’s Office and the U.S. Marshals will hold a joint press conference at 11 a.m. today. — U.S. Marshals (@USMarshalsHQ) November 27, 2019

Brown was charged with second-degree murder in connection to the Nov. 9 killing of a man described as his mom’s boyfriend.

The suspect's mother told investigators that she witnessed the Maine kill Rodney Wilfred Brown at the Hardy home, according to a criminal complaint filed in U.S. District Court.

The mom also identified the getaway vehicle, which was later found in South Carolina, hours southwest of Camp Lejeune in North Carolina, where the Marine is stationed but has been AWOL for the past month.

“I am grateful that he is safe in custody and unharmed, and that law enforcement can now take a deserved break," the suspect's attorney Deborah Caldwell-Bono told Roanoke NBC affiliate WSLS.

Brown drove to Roanoke, Virginia, and tried to contact his grandmother, authorities said. Police found the camper and used an armored vehicle to destroy it but found that Brown was not inside.

"We are thankful for the diligent efforts of the FBI, NCIS, US Marshal's office, and local authorities to apprehend Cpl. Michael Brown," according to a statement by 2nd Marine Logistics Group.