BOBIGNY, France — Six men were found guilty on Wednesday of planning an attack against a Roma camp near Paris in March after online rumors that the Roma were kidnapping children from the French capital’s poorer suburbs.

A court in Bobigny, a northeastern suburb of Paris, found the men guilty of “participating in a group formed with the goal of committing violence,” a provision in France’s criminal code that punishes people who prepare acts of violence, even if they do not carry them out.

Four of the men were sentenced to five to six months in prison. Two others received five-month suspended sentences.

The rumors that spread on social media platforms like Snapchat, Facebook and Twitter were followed by an outburst of violence against the Roma, despite assurances by the French authorities that no kidnappings or attempted kidnappings had been reported to the police.