What is the function of a ligament in relation to movement?

Ligaments provide stability to a joint during both rest and movement. Excessive movements such as hyper-extension or hyper-flexion can be restricted by ligaments. Also, ligaments prevent movements in some directions.