MIAMI -

A South Florida man accused of killing his ex-wife and dumping her body at sea 20 years ago listened in court Wednesday as his friend testified against him in his murder trial.

Alan Gold took the stand and testified that he was on a boat with Cliff Friend in 1994 the night Friend allegedly disposed of Lynne Friend's body.

The prosecutor asked Gold if he helped Cliff throw a bag overboard.

"I did," Gold testified.

"And what did you believe was in that bag?" the prosecutor asked.

"His wife, Lynne," Gold replied.

U.S. Customs officials said they spotted the men dumping something overboard the night of Lynne Friend's disappearance. Her body was never found.

Gold said he agreed to help Cliff dump the body so that his friend wouldn't go to jail and the couple's then-5-year-old son, Christian Friend, wouldn't be left without both parents.

"I basically didn't want to see the kid fatherless," Gold said.

Now an adult, Christian was in court for Gold's testimony.

Gold said Cliff told him he choked Lynne. The couple was in the midst of a bitter custody dispute.

Cliff was arrested in 2012.

Gold was offered immunity from prosecution in exchange for his testimony. He testified that he never intended to talk about the night in question.

"I made a commitment to the guy 20 years," Gold testified. "I didn't see any reason to break it."

"You broke it," the prosecutor said.

"Only because you put me in a box and I don't have any choice," Gold replied.