A Tunisian man armed with a knife attacked worshippers in a French church and killed three on Thursday, prompting the government to raise its security alert to the maximum level.