The suspected mastermind behind the mistaken-identity shooting of retired Red Sox slugger David Ortiz in the Dominican Republic has been arrested — along with the alleged inside man who paid hit men about $8,000, officials said Friday.

Victor Hugo Gómez Vasquez was arrested in the capital of Santo Domingo, while Alberto Miguel Rodriguez Mota was captured off the coast of the province of Samaná as he tried to flee to Puerto Rico, the Boston Globe reported

One suspect remains on the lam, Luis Alfredo Rivas Clase, who also is known as “The Surgeon.”

Last week, authorities described Gómez Vasquez as a dangerous fugitive who was living in the US, adding that he was an associate of Mexico’s Gulf Cartel.

He is accused of ordering the assassination of his cousin and Ortiz pal Sixto David Fernández, who the suspect believed had been snitching on him to local authorities in a 2011 drug case that led to his imprisonment.

Gómez Vasquez’s attorney Carlos Rubio did not return a message for comment Friday, but he posted a video on YouTube in which his client said he “would never do something like this.”

Gómez Vasquez added that he did not try to kill his cousin, “and least of all David, ‘Big Papi.'”

He said he made the video because he fears for his life and wanted to deny the accusations as he called on authorities to investigate the case more thoroughly.

“I want to clarify that I have nothing to do with any attempt on the life against Sixto David Fernández,” he said. “We’re family.”

Gómez Vasquez then accused Fernández of having ties to drug traffickers, saying that many people would back up his claims.

Authorities say the hit men confused Ortiz with Fernández during the June 9 shooting at the Dial Bar and Lounge in Santo Domingo, where the two friends were sharing a table.

The DR’s attorney general, Jean Alain Rodriguez, said the hit men were confused by a grainy photo taken by Rodriguez Mota before the shooting that was intended to point out their target.

Ortiz was flown to Boston, where he remains hospitalized after doctors in the Dominican Republic removed his gallbladder and part of his intestine.

The 43-year-old was moved out of the intensive care unit at Massachusetts General Hospital on Saturday.

On June 19, officials described Gomez Vasquez as the mastermind of the murder plot. He also was being sought by US authorities for his alleged role in drug trafficking.

More than a dozen people are facing charges in connection with the botched assassination attempt.

Officials have 48 hours before they must bring Gomez Vasquez before a judge, according to Dominican law.