The young man, who was known to have psychological problems according to local officials, first lashed out at vehicles outside his home in the sleepy French town, kicking and banging them with his fists then "rounding on female motorists", according to the head of the local ambulance service, Jean-Jacques Girard.
Two paramedics intervened to try to calm him down but he disappeared inside his home, returning with a knife and stabbing them in the head and neck.
He then attacked two of his neighbours, brothers aged 64 and 66, leaving one with a perforated lung and the other with stab wounds in the back.
One of the brothers eventually overpowered him with the help of a man of Cameroonian origin, who helped take the knife off him.
The two brothers were sent to hospital and the man has been placed in custody on charges of aggravated violence.
Police have ruled out a terrorist motive.