In this work we provide a new methodology for comparing regression functions m1 and m2 from two samples. Since apart from smoothness no other (parametric) assumptions are required, our approach is based on a comparison of nonparametric estimators ˆm1 and ˆm2 of m1 and m2, respectively. The test statistics ˆT incorporate weighted differences of ˆm1 and ˆm2 computed at selected points. Since the design variables may come from different distributions a crucial question is where to compare the two estimators. As our main results we obtain the limit distribution of ˆT (properly standardized) under the null hypothesis H0 : m1 = m2 and under local and global alternatives. We are also able to choose the weight function so as to maximize power. Furthermore, the tests are asymptotically distribution-free under H0 and shift and scale-invariant. Several of such ˆT’s may then be combined to get Maximin tests when the dimension of the local alternative is finite. In a simulation study w...