Why can friction point downwards on a rope nailed to an inclined plane?

In Morin's mechanics textbook a problem states:

A rope with length L and mass density $\rho$ per unit length lies on a plane inclined at angle θ. The top end is nailed to the plane, and the coefficient of friction between the rope and the plane is μ. What are the possible values for the tension at the top of the rope".

In the solution, he states that if the rope is placed on the plane without first being stretched, the tension will equal $\rho Lg\sin(θ) - μ\rho Lg\cos(θ)$ or zero if $μ\rho Lg\cos(θ)$ is more than $\rho Lg\sin(θ)$. This makes sense to me, however he then goes on to state:

If, on the other hand, the rope is placed on the plane after being stretched (or equivalently, it is dragged up along the plane and then nailed down), then the friction force will point downwards, and the tension at the top will equal $\rho lg\sin(θ) + μ\rho lg\cos(θ)$.

What does dragging the rope up along the plane or stretching it before nailing it to the plane do to change the direction of friction?