This paper measures market power in a decentralized market where contracts are determined through a search and negotiation process. The mortgage industry has many institutional features which suggest competitiveness: homogeneous contracts, negotiable rates, and, for a given consumer, common lending costs across lenders. As a result, even with a small number of lenders, informed borrowers can gather multiple quotes. However, there is important heterogeneity in the ability of consumers to understand the subtleties of financial contracts, in their ability or willingness to search and negotiate for quotes, and also in their degree of loyalty to their main financial institution. We propose and estimate a model to disentangle the different channels through which market power can arise for a given transaction in this environment. There are two main sources of market power. The first is search frictions. We find that over the five year period of the contract the average search cost corresponds to an upfront sunk cost of between $1,047 and $1,590. The second main source of market power is switching costs. We estimate that consumers are willing to pay between $759 and $1,617 upfront to avoid having to switch banks.