John 19:24
“Let’s not tear it,” they said to one another. “Let’s decide by lot who will get it.”
This happened that the scripture might be fulfilled that said,
“They divided my clothes among them
and cast lots for my garment.”19:24 Psalm 22:18
So this is what the soldiers did.