If Miguel Angel Martinez had any doubt there was a bounty on his head from the Sinaloa cartel when he was thrown in a Mexican jail in the late 1990s, the taunting by his fellow inmates would have erased it.

"They started yelling at me, asking me what my shoe size was," Martinez said Wednesday at the U.S. trial of Mexican drug lord Joaquin "El Chapo" Guzman.

The inmates wanted to get his shoes, he said, because in their minds, "I was actually dead."

Martinez, a former assistant to Guzman who is now a prosecution witness, testified in dramatic detail how he survived four attempts on his life he claimed were ordered by Guzman, one after an ominous serenade by a Mexican brass band.

The witness said he never gave Guzman a reason to want him dead. But it was no mystery that Guzman, as one of Mexico's most notorious kingpins, would have had reason to want to silence potential turncoats.

The testimony came in the third week of a trial at a New York City courthouse where Guzman has pleaded not guilty to drug-trafficking charges that could land him in a U.S. prison for life if he is convicted. His defense says he is being framed by Martinez and other cooperators.

Martinez testified this week about he became a loyal servant of Guzman, helping him arrange the massive shipments of cocaine flown in from Colombia that made his boss a fortune. The two became so close, he said, that Guzman was the godfather to his son.

Martinez told the jury Wednesday that after Guzman landed in prison in 1993, he tried to look after his friend's family and handle his legal fees. That was before his own arrest, which started a behind-bars nightmare.

In the first jail in Mexico City where he was locked up, he was cornered in his cell by other prisoners and stabbed 15 times, he said. After he was released from the hospital, he was returned to very same cell — with the same cellmates.

At night, "I actually heard them polishing their knives, their blades," he said.

Authorities escort Joaquin "El Chapo" Guzman from a plane at Long Island MacArthur Airport on Jan. 19, 2017, in Ronkonkoma, New York. AP file

He survived a second knife attack before he was transferred to another jail, where the interest in his shoe size made it clear there that anyone who killed him would get money from the cartel, he said. He was stabbed again while making a phone call, treated again and put in solitary confinement for his protection.

One night, Martinez said, he heard a band outside the jail playing a favorite "corrido" folk song of Guzman's — "Un Puno De Tierra" — over and over, thought the night. It was about living life to the fullest because "once you die, you can't take anything with you," he said.

The next morning, someone armed with a pistol and a grenade appeared outside his cell, he said. The would-be assassin struggled with a guard who refused to open the cell before tossing the grenade inside. He survived the explosion, he said, by taking cover in the cell's bathroom.

Martinez was eventually extradited to the U.S., where he pleaded guilty to drug charges and began cooperating in other U.S. drug-smuggling cases to a degree that earned him a reduced sentence, cash payments and entry into a witness protection program, he said.

He suggested he still fears Guzman and at the same time, feels forsaken by him.

"I never failed him. I never stole from him. I watched over his family," he said. "And the only thing I ever received from him was four attacks against me."