ABSTRACTMALDI-TOF MS is considered to be an important tool for the future development of rapid microbiological techniques. We propose the application of MALDI-TOF MS as a dual technique for the identification of bacteria and the detection of resistance, with no extra hands-on procedures. We have developed a machine learning approach that uses the random forest algorithm for the direct prediction of carbapenemase-producingKlebsiella pneumoniae(CPK) isolates, based on the spectra of complete cells. For this purpose, we used a database of 4,547 mass spectra profiles, including 715 unduplicated clinical isolates that are represented by 324 CPK with 37 different ST. The impact of the culture medium was determinant in the CPK prediction, being that the isolates were tested and cultured in the same media, compared to the isolates used to build the model (blood agar). The proposed method has an accuracy of 97.83% for the prediction of CPK and an accuracy of 95.24% for the prediction of OXA-48 or KPC carriage. For the CPK prediction, the RF algorithm yielded a value of 1.00 for both the area under the receiver operating characteristic curve and the area under the precision-recall curve. The contribution of individual mass peaks to the CPK prediction was determined using Shapley values, which revealed that the complete proteome, rather than a series of mass peaks or potential biomarkers (as previously suggested), is responsible for the algorithm-based classification. Thus, the use of the full spectrum, as proposed here, with a pattern-matching analytical algorithm produced the best outcome. The use of MALDI-TOF MS coupled with machine learning algorithm processing enabled the identification of CPK isolates within only a few minutes, thereby reducing the time to detection of resistance.