What is the cause of bleeding capillaries in the nails?

Capillary bleeding under both fingernails and toenails can be caused by ruptured capillaries bleeding under the nail plate as a result of heavy bruising, collision injuries, stepping on injuries, etc.