The ontogeny of orientation mechanisms in migratory birds involves a complex of programmed learning rules and calibrations between the several compasses used during migration. Visual information at sunset, especially the pattern of polarized skylight, provides a primary source of orientation information for night-migrating species. To examine the development of visual orientation mechanisms at sunset, hand-raised Savannah sparrows, Passerculus sanchwichensis, were given controlled experience with the clear daytime sky during the first 3 months of life. One group of birds saw the daytime sky only within an earth-strength magnetic field with magnetic north shifted 90 degrees clockwise to true east; a control group had similar exposure to the sky within a normal, unshifted magnetic field. Orientation tests were performed on clear evenings between the time of sunset and the first appearance of stars within a vertical magnetic field of normal earth intensity (no directional magnetic information). There was no difference in the orientation of the two groups: both showed southwestward orientation. Contrary to indications from earlier experiments, the visual orientation mechanism at sunset develops independently of magnetic directions and, in this context, is similar to the ontogeny of stellar orientation. (C) 1997 The Association for the Study of Animal Behaviour.