SANFORD, Fla. — Speaking publicly about the case for the first time, George Zimmerman, the man accused of second-degree murder in the shooting of Trayvon Martin, an unarmed 17-year-old, briefly took the witness stand at his bail hearing on Friday and apologized to the teenager’s parents.

“I wanted to say I am sorry for the loss of your son,” Mr. Zimmerman, 28, said in a soft voice from the stand, dressed in a dark suit, with his hands locked in cuffs, and shackles at his feet and waist. “I did not know how old he was. I thought he was a little bit younger than I am. And I did not know if he was armed or not.”

Mr. Martin’s parents, Tracy Martin and Sybrina Fulton, sitting in the second row of the courtroom here, showed little emotion during Mr. Zimmerman’s remarks. They did not comment after the hearing ended, hurrying to a waiting car.

One of their lawyers, Benjamin Crump, said later that Mr. Martin’s family was “completely devastated” by the Seminole County Circuit Court judge’s decision to allow Mr. Zimmerman to be released from jail on $150,000 bail, which was considerably less severe than the prosecutors’ request for no bail or $1 million.