A drawback of available portfolio credit risk models is that they fail to allow for default risk dependency across loans other than through common risk factors. Thereby, thesemodels ignore that close ties can exist between companies due to legal, financial and business relations. In this paper, we integrate the insights from theoretical models of default correlation into a commonly used model of default and portfolio credit risk by allowing for dependency between firm default risk through both common factors and industry specific errors in a duration model. An application using pooled data from two Swedish banks business loan portfolios over the period 1996-2000 shows that estimates of individual default risk are little affected by including industry specific errors. However, accounting for these industry effects increases VaR estimates by 50-200 percent. A traditional model with only systematic factors, although able to fit the broad trends in credit losses, cannot match these fluctuations because it fails to capture credit losses in bad times, when banks are typically hit by large unexpected credit losses. The model we propose manages to follow both the trend in credit losses and produce industry driven, time-varying, fluctuations in losses around that trend. Consequently, this model will better aid banks and regulators in determining the appropriate size of economic capital requirements. Capital buffers derived from our model will be larger for periods with large aggregate disturbances and smaller in better times, and avoid both overcapitalization in good times and undercapitalization in bad times