FILE PHOTO: Boston Red Sox's Ortiz stands safe at second base and salutes crowd after hitting 2000th career hit against Detroit Tigers during MLB American League Baseball game in Boston

David Ortiz stands safe at second base and salutes the crowd after hitting his 2000th career hit in the sixth inning against the Detroit Tigers during a game in Boston on Sept. 4, 2013.

SANTA DOMINGO — Police in the Dominican Republic have arrested five people in the shooting of former Red Sox star David Ortiz in a plot that authorities on Wednesday said was more complex than originally thought.

The arrests came as Ortiz, 43, recovering in a Boston hospital following a second round of surgery on Tuesday, according to his family, who said he was sitting up and had taken a few steps.

The plot to kill Ortiz, a national hero in the Dominican Republic, involved two men on a motorcycle working with two other groups of people in cars, said National Police Chief Ney Aldrin Bautista Almonte.

He also said the gun used in the shooting had been recovered.

“It didn’t just involve two people — more people took part,” Bautista told a press conference, adding that another person linked to the plot nicknamed “The Surgeon” still remained at large.

Ortiz is a legend in New England for his role in three World Series championships as well as his profane and inspiring remarks in the days after the 2013 Boston Marathon bombing.

He retired in 2016 after hitting 541 career home runs, which ranks 17th all-time in Major League Baseball.

Ortiz was shot in the torso on Sunday evening while seated at an open-air nightclub in Santo Domingo, the capital of his native country, after the gunman rolled up on a motorcycle. Ortiz’s friend Jhoel López, a television host, was also wounded in the shooting.

Police quickly arrested one suspect, identified as Eddy Féliz García, who was detained and beaten by bystanders at the scene.

Second surgery in Boston

Ortiz underwent a first round of surgery in Santo Domingo late on Sunday before being flown the following day to Boston’s Massachusetts General Hospital, where he underwent more surgery.

A trauma and acute care surgeon was leading the team treating Ortiz, his wife, Tiffany Ortiz, said in a statement on Wednesday.

On Tuesday “and this morning, David was able to sit up as well as take some steps,” she said on Wednesday. “His condition is guarded and he will remain in the (intensive care unit) for the coming days, but he is making good progress towards recovery.”

Féliz appeared in court on Tuesday evening, charged with being an accomplice in the attempted murder of Ortiz. His lawyer, Deivi Solano, told reporters outside the court that the judge had agreed to postpone a hearing until Wednesday afternoon.

Justina García, the mother of Féliz who remained in custody, told reporters the charges against her son were a “lie.”

“They can’t link it to him because he is not a criminal,” she said.

Solano said his client did not shoot Ortiz, but works as a motorcycle taxi driver and may have unwittingly driven the shooter to the scene, CNN reported.

Ortiz played 20 MLB seasons, spending his first six years with the Minnesota Twins before joining the Boston Red Sox.