This paper addresses the problem of simultaneously estimating the state and the input of a linear discrete-time system. A recursive filter, optimal in the minimum-variance unbiased sense, is developed where the estimation of the state and the input are interconnected. The input estimate is obtained from the innovation by least-squares estimation and the state estimation problem is transformed into a standard Kalman filtering problem. Necessary and sufficient conditions for the existence of the filter are given and relations to earlier results are discussed. ᭧ 2006 Elsevier Ltd. All rights reserved.