An anti-terrorism judge on Friday handed preliminary charges to a man who met with two extremists shortly before they killed a priest at Mass, a judicial official said.

The 21-year-old, from Toulouse in southwest France, was arrested last week.

The judicial official said the man, whose name was not given, was charged with association with terrorism "with the intention of committing crimes of bodily harm." The official spoke on condition of anonymity because the person wasn't authorized to speak publicly about the case.

The official said the man was questioned about his alleged meetings July 24-25 with the killers in Saint-Etienne-du-Rouvray, outside Rouen. The Rev. Jacques Hamel was killed in his church in the Normandy town on July 26.

Police killed the two 19-year-old attackers, Adel Kermiche and Abdel-Malek Petitjean, outside the church.

The Islamic State group claimed responsibility for the attack.

The suspect was also allegedly in contact with Kermiche via the messaging app Telegram, which encrypts messages and is a preferred means of communication for Islamic State militants.