This study examines the diversity of spore-forming bacteria isolated from raw materials/bread using molecular methods along with a rapid and innovative technology, the FT-NIR spectroscopy. Microbiological analysis showed that 23% of semolina and 42% of other raw materials (including grain, brewer yeast, improvers) contained more than 100 spores/g and more than 50% of each kind of sample was contaminated at a level ranging from 1 to 100 spores/g. A high bacterial diversity characterized raw materials. In total 176 isolates were collected and characterized: 13 bacterial species belonging to Bacillus (10) and Paenibacillus (3) genera were identified by sequencing of 16S rRNA, gyrA or gyrB genes. The two closely related species Bacillus amyloliquefaciens (strain N45.1) and Bacillus subtilis (strain S63) were also analyzed by the spectroscopic technique FT-NIR. This analysis gave clear discrimination between the strains in the score plot obtained by the PCA and allowed to identify the spectral region 5600–4000cm−1 as the information-rich region for discrimination. B. amyloliquefaciens, possibly misidentified as B. subtilis in previous studies, was recognized as the most frequent species, found also in ropy bread. Moreover, the screening test for rope production indicated that mainly B. amyloliquefaciens, together with B. subtilis and Bacillus pumilus, could cause spoilage in bread, even if the last two species were represented by a low number of isolates. The Bacillus cereus group and Bacillus megaterium showed a lower percentage (30–70%) of isolates potentially able to cause the rope, but considering the high number of B. cereus group isolates detected in this study, this bacterial group should also be considered important in rope spoilage. In conclusion, results demonstrate that raw materials used to produce bread represent a rich source of spore-forming bacteria, therefore their microbiological quality should be monitored before use. Moreover, this study highlights for the first time the importance of the species B. amyloliquefaciens in rope spoilage and indicates that other species may also cause this alteration although strains of the same species may behave differently.