FALL RIVER, Mass. -- Prosecutors in a murder case against Aaron Hernandez won't be allowed to tell a jury about two other killings with which the ex-New England Patriot is charged or the final text messages the victim sent to his sister, a judge ruled Friday.

Hernandez has pleaded not guilty to murder in the June 2013 killing of Odin Lloyd, a semi-professional football player who was dating the sister of Hernandez's fiancee. He has also pleaded not guilty to the fatal shootings of two men in 2012 after an encounter at a Boston nightclub.

Jury selection in the murder trial of former New England Patriots tight end Aaron Hernandez for the killing of Odin Lloyd is scheduled to begin Jan. 9. Jared Wickerham/Getty Images

Prosecutors have said Hernandez may have showed Lloyd the spot where the double shooting allegedly took place, and suggested that was a possible motive for killing Lloyd.

"I don't think that it's fair to say these things aren't relevant," said Assistant District Attorney William McCauley.

But Judge E. Susan Garsh, after hearing arguments, said the prosecution's theory is "clearly in the realm of speculation" and "does not comport with common sense." She said there was no demonstrated link between the two crimes and disallowed the introduction of the 2012 homicides.

Garsh also said Friday she would not admit the final text messages sent by Lloyd to his sister, including one sent just minutes before he was shot to death at an industrial park near Hernandez's North Attleborough home.

Prosecutors say Lloyd sent the messages while in a car with Hernandez and suggested they showed he had become fearful. One said, "U saw who I'm with" and another indicated the person was "NFL," referring to Hernandez, adding "just so u know."

McCauley suggested Hernandez stopped somewhere on the way to the spot Lloyd was killed, saying investigators found dirt in his car's tires that didn't match soil from the crime scene. The car, which had been in "pristine shape" when Lloyd was picked up, was later found to be scratched and the side mirror missing, he said.

Defense lawyers called it "rank speculation" that the texts indicated fear and said they were inadmissible.

Garsh said the texts did not suggest any hostility and that prosecutors didn't meet the burden to prove Lloyd felt he was at an "imminent death."

Jury selection is scheduled to start Jan. 9. Patriots coach Bill Belichick and team owner Robert Kraft have been listed by prosecutors as possible witnesses.

Garsh also ruled that prosecutors may not introduce the shooting of Alexander Bradley, a former associate of Hernandez. Bradley has filed a civil suit against Hernandez that says the ex-player shot him in the face in 2013 after an argument in Florida.

Massachusetts prosecutors sought to admit a range of evidence related to the ex-player's other alleged crimes or "bad acts," including the Boston homicides, firearms found at Hernandez's home or elsewhere and even a photograph obtained from the celebrity gossip website TMZ that depicts Hernandez holding a gun.

His attorneys warned against compromising his right to a fair trial.

"It is critical that this trial be about the murder of Odin Lloyd," defense attorney James Sultan said Friday.

The judge allowed in some evidence relating to firearms, but disallowed the photograph.