The kiss happened on Tuesday when the judge and the jury were out of the courtroom. Hernandez has pleaded not guilty in the June 2013 killing of Odin Lloyd, who was dating the sister of Hernandez's fiancee.
During a morning break, Hernandez's mother, Terri Hernandez, leaned toward him while he was sitting at the defence table and asked permission from the court officer to touch him.
The officer said yes, and she grabbed his hand and kissed it.
Hernandez gave a broad smile and then rubbed his eyes as his aunt and uncle wiped away tears. He then thanked the officer.
Such contact between prisoners and the public is usually prohibited.
Outside the courtroom during a lunch break on Wednesday, Lloyd's relatives quietly and calmly spoke to the officer and told him they no longer have a son to kiss. The officer listened and then left to a back hallway while Lloyd's family departed in an elevator.
Also Wednesday, Hernandez's lawyers filed papers asking the judge to keep out of the case snippets of several pretrial jailhouse conversations he had with people including Miami Dolphins player Mike Pouncey, who went to college with him. The filing included partial transcripts of several conversations.
In one from October 2014, Hernandez and Pouncey discuss how they miss Ernest Wallace, one of Hernandez's co-defendants. Hernandez, who grew up in Bristol, Connecticut, and went to the University of Florida, tells Pouncey that Wallace is being held in a cell next to "the Mafia dude," an apparent reference to Boston mobster James "Whitey" Bulger.
In other conversations, Hernandez says he has set up an account to benefit the sons of his cousin Tanya Singleton, who was charged with criminal contempt for failing to testify before a grand jury. Singleton also was accused of helping Wallace flee to Georgia after Lloyd's killing and was charged with conspiracy to commit accessory after the fact. She has pleaded guilty to the contempt charge.
In the courtroom Wednesday, state police Lt. Steven Bennett testified about footprints found at the crime scene. Among them was one made by what he said appeared to be a left shoe with three or four waves of a herringbone-type design in the middle.
He said it was consistent with the Nike sneaker Hernandez was seen wearing in surveillance video shortly before and after the killing. He testified the shoeprint was found a few feet from Lloyd's body and on the other side of two tire tracks.
Hernandez lawyer James Sultan went after the testimony, saying Bennett had said in an earlier report the shoeprint "lacked sufficient quality" to make a comparison.
Prosecutors also played surveillance camera footage showing headlights moving away from the crime scene, an empty lot in an industrial park near Hernandez's North Attleborough home. They showed headlights leaving at 3:27 a.m., four minutes after Lloyd sent his last text message.