But his ascent to stardom also made Ortiz, like other multimillionaire athletes in the Caribbean and beyond, a prime target for hustlers, criminals, and opportunists, and vulnerable to random crime.In his own biography, Ortiz touched on the difficulty of life as a celebrity in his native country, a familiar world that grew hard for him to navigate because “some of the people there always want something from me.”As he endures an arduous recovery from a near-fatal gunshot wound he suffered six weeks ago in an attack at a nightclub in Santo Domingo, a review of court records and his own writings reveals a man who grappled with life in the limelight and its corollary risks, having encountered past trouble with Dominican associates close to him, including one man on his own payroll. In several cases, those in Ortiz’s orbit brought trouble to the baseball star, or, unwittingly, brought the star into proximity with trouble.Authorities in the Dominican Republic initially said Ortiz had been followed to the club and was the target of a contract killing on June 9. They later reversed course and said the shooting stemmed from a case of mistaken identity and was instead a botched ambush on one of Ortiz’s friends, Sixto David Fernández, an auto repair shop owner who was sitting at a table near the slugger.Ortiz, 43, was shot in the back at close range, and nearly died from traumatic injuries to his liver, intestines, and gall bladder, which was removed. He remains under care at Massachusetts General Hospital, where he recently underwent a third surgery. His wife, Tiffany, said after the surgery, “He is recovering well and in good spirits.’’Victor Hugo Gomez Vasquez is accused of paying for the June 10 shooting that left Ortiz with serious injuries.(Screenshot)Dominican authorities say Fernández’s cousin, Victor Hugo Gomez Vasquez, paid others to kill Fernández in retribution for reporting him to police some eight years ago. Just before his June 28 arrest, Gomez Vasquez released a video in which he professed his innocence and suggested Fernández had long taken advantage of other Dominicans and had his own enemies.Before police identified him as the target, Fernández told Dominican media about his friendship with Ortiz. The men appear in photos online together, and in one video Ortiz offers Fernández birthday wishes.Fernández did not respond to requests for comment. An Ortiz family spokesman referred inquiries to the Red Sox organization. A team spokesman said the family declined to comment. (The principal owner of the Red Sox, John W. Henry, is also owner and publisher of The Boston Globe.)Many in the Dominican Republic, where the retired Sox star is revered as a national hero, have expressed doubts about the mistaken identity theory and the motives outlined by prosecutors. The doubters don’t have much to go on, in terms of evidence. Instead, it comes down to a general distrust of the island nation’s law enforcement and to this question: How could perhaps the most unmistakable man in the Dominican be a victim of mistaken identity?Ortiz is not the first Boston sports star to be critically wounded in a nightclub attack. In 2000, then Boston Celtics forward Paul Pierce was stabbed multiple times, suffering a collapsed lung and wound near his heart, during a dispute in a downtown nightclub. Two men were convicted in the attack, and Pierce later told the Globe the incident prompted him to buy a gun and obtain a license to carry a concealed weapon.“I know we’re in a position where every time you go out and people see you driving a nice car and wearing a fancy watch, it’s in the back of your head that somebody might come up on you,” Pierce said in a 2006 interview.To protect players from the hazards that come with celebrity status, Major League Baseball has for years placed security specialists inside team clubhouses, where they educate athletes and handle problems that may arise. Their oversight seldom stretches far beyond the ballpark and does not extend to former players like Ortiz. But their cautions offer a window into the safety challenges star athletes face out in the world, particularly in foreign countries.“It always concerns me when these guys feel so comfortable when they go back to their countries,’’ said Joe Russo, who consulted for the New York Yankees and currently oversees security for celebrity athletes at New York-based T&M Protection Resources. “They need to listen to the security advice they got as players.’’Russo said that advice includes cutting ties to friends and acquaintances who could make them more susceptible to trouble.. . .David Ortiz held the World Series trophy at the Red Sox rolling rally celebrating the 2004 championship.(Stan Grossfeld/Globe Staff/File)One case in which Big Papi found himself victimized dates to the fall of 2012 in Boston, when Ortiz became the extortion target of a Dominican-American ex-convict with a history of violence, according to court records and an investigator who worked undercover on the case.For reasons that remain unclear, Ortiz and the ex-convict, Felix A. Paulino, were together in a private back room at the Venu nightclub one night in the Theatre District.Paulino videotaped Ortiz chatting with several women. Even though the video allegedly showed Ortiz doing nothing more than playfully flirting with the women, Paulino phoned Ortiz’s agent, Fernando Cuza, and threatened to sell the recording to the celebrity gossip site TMZ unless Ortiz paid him $20,000.For help, Cuza turned to Eddie Dominguez, a former Boston Police detective who had served as Major League Baseball’s resident security agent for the Red Sox from 1998 to 2008 — even though Ortiz had previously clashed with Dominguez after the security agent kicked some of the slugger’s friends out the Sox clubhouse. At the time, Dominguez was a manager in Major League Baseball’s department of investigations.Despite their rift, Dominguez said Ortiz gave him permission to go undercover, posing as Cuza, to help the FBI investigate the extortion threat. Dominguez said he negotiated several times with Paulino by phone, then arranged to meet him at a restaurant in downtown Boston — a meeting Paulino abruptly halted when he and his crew spotted an FBI surveillance team, according to court records.Agents later arrested Paulino in a car outside his Lowell home and found a loaded .22-caliber handgun under his seat.Paulino pleaded guilty in US District Court in Boston in 2014 to extortion and being a felon in possession of a firearm and was sentenced to two years in prison. The case received scant public attention because a judge granted a motion by federal prosecutors to conceal Ortiz’s identity, citing his privacy rights as a victim.Ortiz is identified in Paulino’s indictment as “John Doe, a well-known Boston personality.’’ Dominguez very briefly referenced the case in his 2018 book, “Baseball Cop: The Dark Side of America’s Pastime.’’ Last month, based on additional information from Dominguez, the Globe located the court file on the case.In an interview, Dominguez said he was not surprised Ortiz was targeted for extortion. When he served as a Sox security agent, and again in the years after, Dominguez said he counseled Ortiz about the risks of associating with shady characters and exposing himself to possible trouble on the nightclub circuit.He said he even cited to Ortiz the case of former Patriots star Aaron Hernandez, who never broke away from his wayward Connecticut hometown friends and was arrested for murder in 2013. He said Ortiz, still angry at Dominguez for raising questions about his friends, did not seem receptive to his warnings.“I remember David standing there with his arms crossed, staring at me,’’ Dominguez said, describing Ortiz’s look as defiant.Ortiz has raised money for desperately ill children in Boston and the Dominican Republic.(Stan Grossfeld/Globe Staff/File 2006)Ortiz is widely adored from the Dominican barrios to American boardrooms. He has attained the image of a big-hearted force for good, whether glad-handing strangers on the streets, raising money for desperately ill children in both countries, or exhorting a traumatized city to unite in strength after the Boston Marathon bombings.He is revered by Boston baseball fans as a Curse-buster, an invaluable contributor to the Sox eradicating their 86-year championship drought by winning the 2004 World Series. A 10-time All-Star, Ortiz also helped the Sox win titles in 2007 and 2013. He is considered the greatest clutch hitter in Sox history and one of the most dominant designated hitters in the game.In 2011, he received the Roberto Clemente Award, MLB’s highest honor for those who represent baseball through positive contributions on and off the field.But there have been thorns among the roses, some with roots in his native land.Ortiz’s paid personal assistant, Felix Leopoldo Marquez Galice, a Dominican he once described as his half-brother, would have his own run-ins with the law in Boston that brought scrutiny on the sports star. Dominguez also investigated Marquez, who was going by the name Edwin Cotto Garcia at the time.In 2005, Dominguez, then working in the Sox clubhouse, heard Marquez might be betting on baseball at a time when he was a regular visitor at Fenway with Ortiz, Dominguez said.Dominguez alleged that an informant told him Marquez was betting on games through a Dominican barber in Roxbury. Specifically, Dominquez said he heard that on July 24, 2005, Marquez gambled $1,000 that the Chicago White Sox would defeat the Red Sox and wagered an additional $1,000 that the teams would combine to score at least nine runs.Marquez, whose nickname was “Monga,’’ allegedly cashed in on both bets, as the White Sox won, 6-4, in Chicago. Ortiz batted five times and hit a solo home run in the loss.“I found it alarming that Monga had that kind of money’’ to wager, Dominguez said. He said he was also alarmed that Ortiz, however unwittingly, employed a close associate who had purportedly bet heavily on a Sox game.No one was charged, and Dominguez said there was no evidence that Ortiz was involved in any wrongdoing.Still, Ortiz pushed back at the allegations after Dominguez included them in his book last year.“I wasn’t gonna comment on this episode but someone outta nowhere once again try to diminish my image just to sell a couple books . . . just for some $$ in his pocket,” Ortiz tweeted after the release of Dominguez’s book. “I have been a player that has been extremely blessed not only with the love of the fans but also with lots of $$ and I’m SMART ENOUGH to not get caught up in some BS like that, trust me!”Marquez was officially barred from major league clubhouses after the gambling allegations. But he continued to occasionally find his way into the Sox clubhouse, Dominguez said.As David Ortiz competed in the 2006 Home Run Derby in Pittsburgh his associate Felix Leopoldo Marquez Galice (near ESPN cameraman) drew the attention of MLB officials.(Al Bello/Getty Images/File)A year later, Dominguez was watching the 2006 Home Run Derby on TV, with Ortiz competing for the title, when he saw Marquez milling about on the field of PNC Park in Pittsburgh.“I saw Monga on the field — along with several barbers I had identified to MLB as shady characters — toweling off Ortiz and other Dominican players,’’ Dominguez wrote in his book.He said he promptly called an MLB security executive, who told him league officials had tried to keep Ortiz’s entourage off the field, to no avail.Ortiz did not win the derby that year. By 2010, though, when Ortiz did win the derby, Marquez had been convicted in federal court on nine counts related to making false claims of US citizenship. The case stemmed from Dominguez’s investigation of him during his time as MLB’s security agent for the Sox.Trial testimony showed Marquez had passed himself off in the United States as Edwin Garcia, the identity of an incarcerated drug felon in Puerto Rico that Marquez had bought from a third party for $500. During this period, according to evidence at the trial, Marquez had rented an Allston apartment under the name Edwin Garcia.When Marquez renewed the lease in 2007 under his own name, Ortiz guaranteed in writing that he would pay the rent if Marquez defaulted, according to trial testimony. Marquez also testified that Ortiz sponsored his application to become a legal permanent resident of the United States.Marquez was sentenced to six months incarceration and three years of supervised release. His Facebook page now indicates he lives in the Dominican Republic. A photo on the page shows him wearing a Red Sox T-shirt. He did not respond to a message seeking comment.Ortiz was not charged or called as a witness in Marquez’s 2010 trial. When the Globe asked him to comment about the arrest of his paid assistant, Ortiz said, “I don’t know anything about it.’’Americo Enrique Ortiz, David’s father, still lives in Santo Domingo.(Bill Greene/Globe Staff/File 2004)One day, when he is well enough to travel after recovering from his ordeal, he may return to Santo Domingo, where his father and sister live and where his memories of his mother, who died in a 2002 car crash, run deep.He has often addressed the burden of celebrity in his native land. In his 2008 book, “Big Papi: My Story of Big Dreams and Big Hits,’’ he wrote that it sometimes is difficult to return to the Dominican Republic.He recalled one episode in 2005, hanging out with friends in a park near his apartment in Santo Domingo, just “killing time, relaxing, and listening to music,’’ when a stranger tried to ingratiate himself with him and wouldn’t leave.Ortiz said the stranger made him so uncomfortable that he needed his friends to ask the man to leave him alone.“In the Dominican, it’s just a little hard sometimes,’’ Ortiz wrote. “It can make you a little worried.’’Aimee Ortiz of the Globe staff contributed to this report. Bob Hohler can be reached at email@example.com.