We endogenize credit misallocation by introducing the government’s preference. The local government determines the credit subsidy to SOEs after a trade-off between SOEs’ profits and local aggregate outputs. Credit misallocation is more severe in regions where SOE share is high.