In typical urban or suburban environments, multipath poses a serious threat to the accuracy of position determined by a global navigation satellite system (GNSS) receiver. In this paper, a novel multipath mitigation technique is proposed for general multipath scenarios encountered in the urban settings. In the proposed technique, a double differentiated correlation function based histogram output is used to estimate the code delay. It is shown that the proposed technique provides significant improvements over the current state of the art techniques like high resolution correlator/double delta correlator and narrow correlator. The results hold for general multipath models for the mobile-satellite channels. The performance guarantees include closed form expressions for the probability of correct delay estimate and simulation results for the average range error variation with respect to carrier to noise ratio (CNR), signal bandwidth and different channel settings.