Bayesian networks (BNs) represent one of the most successful tools for medical diagnosis, selection of the optimal treatment, and prediction of the treatment outcome. In this paper, we present an algorithm for BN structure learning, which is a variation of the standard search-and-score approach. The proposed algorithm overcomes the creation of redundant network structures that may include nonsignificant connections between variables. In particular, the algorithm finds what relationships between the variables must be prevented, by exploiting the binarization of a square matrix containing the mutual information (MI) among all pairs of variables. Two different binarization methods are implemented. The first one is based on the maximum relevance minimum redundancy selection strategy. The second one uses a threshold. The MI binary matrix is exploited as a preconditioning step for the subsequent greedy search procedure that optimizes the network score, reducing the number of possible search paths in the greedy search. Our algorithm has been tested on two different medical datasets and compared against the standard search-and-score algorithm as implemented in the DEAL package.