This video shows a prepupal larva of a fly (<i>Drosophila melanogaster</i>) preparing the exit of its tunnel for embedding itself. The larva initially scrapes the agar around the tunnel exit while still retaining its posterior end within the tunnel it dug. The scraped agar eventually becomes mushy and solidifies as the larva pupates by embedding.
Narasimha S, Kolly S, Sokolowski M, Kawecki T, Vijendravarma R
CC BY 4.0
<a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4324899/bin/pone.0117280.s002.mp4">S1 Video</a> from <cite style="font-style:normal">Narasimha S, Kolly S, Sokolowski M, Kawecki T, Vijendravarma R (2015). "<a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4324899">Prepupal Building Behavior in Drosophila melanogaster and Its Evolution under Resource and Time Constraints</a>". <i>PLOS ONE</i>. <a href="https://en.wikipedia.org/wiki/Digital_object_identifier" class="extiw" title="w:Digital object identifier">DOI</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1371/journal.pone.0117280">10.1371/journal.pone.0117280</a>. <a href="https://en.wikipedia.org/wiki/PMID" class="extiw" title="w:PMID">PMID</a> <a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pubmed/25671711">25671711</a>. <a href="https://en.wikipedia.org/wiki/PubMed_Central" class="extiw" title="w:PubMed Central">PMC</a>: <a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4324899">4324899</a>.</cite>