This paper considers a panel data stochastic frontier model that disentangles unobserved firm effects (firm heterogeneity) from persistent (time-invariant/long-term) and transient (time-varying/short-term) technical inefficiency. The model gives us a four-way error component model, viz., persistent and time-varying inefficiency, random firm effects and noise. We use Bayesian methods of inference to provide robust and efficient methods of estimating inefficiency components in this four-way error component model. Monte Carlo results are provided to validate its performance. We also present results from an empirical application that uses a large panel of US commercial banks.