The dipping dike model has shown to be a useful approximation for mineral deposits. To make this model more realistic, we include the thickness, which yields the depth to the bottom, as an additional parameter. The magnetic anomaly is obtained by combining the anomalies of two infinite dikes, so that the resulting expression is simpler than the classical prismatic models with polygonal cross section. We employ a Metropolis-Hasting (MH) algorithm coupled with the Levenberg-Marquardt (LM) method to invert magnetic profiles assuming a model of multiple dike-like sources. We use a few iterations of the LM method to improve the candidate solutions at the end of each random walk generated by MH. The following parameters are obtained: depth to the top, thickness, half-width, horizontal location of the top center, geological dip, in addition to two effective parameters that depend on the intensity of magnetization and the directions of the induced and remanent fields. For synthetic anomalies, both noise-free and noisy magnetic data are considered, with examples presented for each scenario. These examples highlight the discrepancy between models with finite and infinite sources. They also illustrate the higher accuracy of the hybrid MH-LM method over the pure MH approach. Moreover, two field examples related to mineral exploration have been considered: the Pima copper mine, United States, where the relative differences between the parameters obtained by our algorithm and those known from drilling are not higher than 10%, and a magnetic profile over iron ore deposits located in Laje, northeast Brazil, where the inverted parameters were useful for detailing previous studies.