This paper provides measures of credit rationing in the market of term loans to Italian non-financial firms. We identify non-price allocations of credit by exploiting a unique bank-firm dataset of more than 5 million observations, which matches the quantity and the cost of credit available from the Credit Register with a number of bank- and firm-specific characteristics from different sources of microdata. We propose an approach that endogenously identifies all the bank-firm transactions subject to credit rationing, thus circumventing aggregation biases stemming from the use of less detailed information. The estimates suggest that in the Italian case, rationing mostly reflected an increase in non-performing loans in banks' portfolios and a decline in available collateral. Borrowers' characteristics played a minor role, although banks did switch their supply of funds in favour of firms with greater creditworthiness after the outbreak of the sovereign debt crisis.