PARIS — A Paris court on Friday sentenced a French-Algerian particle physicist to five years in prison, one of them suspended, on the charge of “criminal association with the intent to prepare terrorist acts,” ruling that the man’s online correspondence in 2009 with a presumed member of Al Qaeda constituted a criminal act.

The scientist, Adlène Hicheur, 35, did not deny the exchange of messages, in which he suggested targets for terrorist strikes in France, but maintains that he never intended to act on his words. The trial has raised difficult questions about the possible excesses of French antiterrorism law, which in effect treats intent as a criminal act.

A researcher at the Large Hadron Collider project at CERN, the European Organization for Nuclear Research, in Switzerland, Dr. Hicheur met his interlocutor on an Internet forum dedicated to radical Islam while on sick leave, nursing a herniated disk at his parents’ home in southeastern France.

Dr. Hicheur has been in prison since his arrest 2 1/2 years ago; that period will be counted as time served, his lawyer said Friday, adding that they would decide in coming days whether to appeal the verdict.