Authorities in the Dominican Republic say they are closing in on the mastermind and motive behind the shooting of Red Sox baseball great David Ortiz as he recovers in a hospital in Boston.

A judge on Monday ordered a man nicknamed "Bone" to one year in preventive prison during a hearing closed to the public.

According to documents obtained by The Associated Press, the man, whose real name is Gabriel Alexánder Pérez Vizcaíno, is accused of being the liaison between the alleged hit men and the person who paid them.

Lawyer José Martínez Hoepelman, who represents former Boston Red Sox slugger David Ortiz, speaks to the press outside court in Santo Domingo, Dominican Republic, Monday, June 17, 2019. Ortiz was shot in the back at a bar in the Dominican Republic on Sunday, June 9. (AP PhotoRoberto Guzman)

Lawyer José Martínez Hoepelman, who represents former Boston Red Sox slugger David Ortiz, speaks to the press outside court in Santo Domingo, Dominican Republic, Monday, June 17, 2019. Ortiz was shot in the back at a bar in the Dominican Republic on Sunday, June 9. (AP PhotoRoberto Guzman)

The documents also state that Pérez sold the cellphone allegedly used to plan the attack to a woman for $180 a day after the June 9 shooting. Authorities said he wanted to get rid of the evidence.

Rolfy Ferreyra Cruz, a suspect in connection with the shooting of former Boston Red Sox slugger David Ortiz, is taken to court by police in Santo Domingo, Dominican Republic, Friday, June 14, 2019. Ortiz was shot in the back at a bar in the Dominican Republic on Sunday, June 9. (AP PhotoRoberto Guzman)

Rolfy Ferreyra Cruz, a suspect in connection with the shooting of former Boston Red Sox slugger David Ortiz, is taken to court by police in Santo Domingo, Dominican Republic, Friday, June 14, 2019. Ortiz was shot in the back at a bar in the Dominican Republic on Sunday, June 9. (AP PhotoRoberto Guzman)

FILE - In this July 15, 2018, file photo, World Team Manager David Ortiz (34) speaks with U.S. Team Manager Torrii Hunter, before the All-Star Futures baseball game at Nationals Park, in Washington. Ortiz returned to Boston for medical care after being shot in a bar Sunday, June 9, 2019, in his native Dominican Republic. (AP PhotoAlex Brandon, File)

FILE - In this July 15, 2018, file photo, World Team Manager David Ortiz (34) speaks with U.S. Team Manager Torrii Hunter, before the All-Star Futures baseball game at Nationals Park, in Washington. Ortiz returned to Boston for medical care after being shot in a bar Sunday, June 9, 2019, in his native Dominican Republic. (AP PhotoAlex Brandon, File)

This combination of photos provided by the Dominican Republic National Police on Wednesday, June 12, 2019 show suspects in connection with the shooting of former Red Sox star David Ortiz in Santo Domingo, Dominican Republic. Police identify the men as, top row from left, Rolfy Ferreyra, who has been identified as the shooter, Joel Rodriguez Cruz, Oliver Moises Mirabal Acosta, and Eddy Vladimir Feliz Garcia. Bottom row from left, Polfirio Allende Dechamps Vazquez, Luis Alfredo Rivas Clase and Reynaldo Rodriguez Valenzuela. All the men with the exception of Rivas Clase have been detained. (Dominican Republic National Police via AP)

This combination of photos provided by the Dominican Republic National Police on Wednesday, June 12, 2019 show suspects in connection with the shooting of former Red Sox star David Ortiz in Santo Domingo, Dominican Republic. Police identify the men as, top row from left, Rolfy Ferreyra, who has been identified as the shooter, Joel Rodriguez Cruz, Oliver Moises Mirabal Acosta, and Eddy Vladimir Feliz Garcia. Bottom row from left, Polfirio Allende Dechamps Vazquez, Luis Alfredo Rivas Clase and Reynaldo Rodriguez Valenzuela. All the men with the exception of Rivas Clase have been detained. (Dominican Republic National Police via AP)