This paper presents the results of a numerical study carried out by 2D discrete element method analyses on the mechanical behavior and strain localization of loose cemented granular materials. Bonds between particles were modeled in order to replicate the mechanical behavior observed in a series of laboratory tests performed on pairs of glued aluminum rods which can fail either in tension or shear (Jiang et al. in Mech Mater 55:1-15, 2012). This bond model was implemented in a DEM code and a series of biaxial compression tests employing lateral flexible boundaries were performed. The influence of bond strength and confinement levels on the mechanical behavior and on the onset of shear bands and their propagation within the specimens were investigated. Comparisons were also drawn with other bond models from the literature. A new dimensionless parameter incorporating the effects of both bond strength and confining pressure, called BS, was defined. The simulations show that shear strength and also dilation increase with the level of bond strength. It was found out that for increasing bond strength, shear bands become thinner and oriented along directions with a higher angle over the horizontal. It also emerged that the onset of localization coincided with the occurrence of bond breakages concentrated in some zones of the specimens. The occurrence of strain localization was associated with a concentration of bonds failing in tension.