Let S n + the n-sphere with a disjoint basepoint. We give conditions ensuring that a map h:X → Y that induces bijections of homotopy classes of maps [S n + , X] [S n + , Y] for all n 0 is a weak homotopy equivalence. For this to hold, it is sufficient that the fundamental groups of all path-connected components of X and Y be inverse limits of nilpotent groups. This condition is fulfilled by any map between based mapping spaces h: map * (B, W) → map * (A, V) if A and B are connected CW-complexes. The assumption that A and B be connected can be dropped if W = V and the map h is induced by a map A → B. From the latter fact we infer that, for each map f, the class of f-local spaces is precisely the class of spaces orthogonal to f and f S n + for n 1 in the based homotopy category. This has useful implications in the theory of homotopical localization.