Phagocytosis, a type of endocytosis, was used by a prokaryote to engulf a second prokaryote.
This process is thought to relate to the formation of eukaryotes through the endosymbiotic theory, where one prokaryotic cell engulfed another, leading to a symbiotic relationship that eventually resulted in the evolution of complex eukaryotic cells.