  Recent ideas for the origin and persistence of the warps commonly observed in
disc galaxies have focused on cosmic infall. We present N-body simulations of
an idealized form of cosmic infall onto a disc galaxy and obtain a warp that
closely resembles those observed. The inner disc tilts remarkably rigidly,
indicating strong cohesion due to self-gravity. The line of nodes of the warp
inside $R_{26.5} ~ 4.5 \Rd$ is straight, while that beyond $R_{26.5}$ generally
forms a loosely-wound, leading spiral in agreement with Briggs's rules. We
focus on the mechanism of the warp and show that the leading spiral arises from
the torques from the misaligned inner disc and its associated inner oblate
halo. The fact that the line of nodes of most warps forms a leading spiral
might imply that the disc mass is significant in the centre. If the line of
nodes can be traced to very large radii in future observations, it may reveal
information on the mass distribution of the outer halo. The warp is not
strongly damped by the halo because the precession rate of the inner disc is
slow and the inner halo generally remains aligned with the inner disc. Thus
even after the imposed quadrupolar perturbation is removed, the warp persists
for a few Gyrs, by which time another infall event can be expected.
