This article presents an IRT-based statistical test for differential item functioning (DIF). The test is developed for items conforming to the Rasch model but we will outline its extension to more complex IRT models. Its difference from the existing procedures is that DIF is defined in terms of the relative difficulties of pairs of items and not in terms of the difficulties of individual items. The argument is that the difficulty of an item is not identified from the observations, whereas the relative difficulties are. This leads to a test that is closely related to Lord's test for item DIF albeit with a different and more correct interpretation. Illustrations with real and simulated data are provided.