Phagocytosis requires phosphoinositides (PIs) as both signaling molecules and localization cues. How PIs coordinate to control phagosomal sealing and the accompanying switch of organelle identity is unclear. In this study, we followed dynamic changes in PIs during apoptotic cell clearance in Caenorhabditis elegans. We found that phosphatidylinositol-4,5-bisphosphate (PtdIns(4,5)P2) and phosphatidylinositol-3-phosphate (PtdIns3P), which accumulate transiently on unsealed and fully sealed phagosomes, respectively, are both involved in phagosome closure. We identified PtdIns3P phosphatase MTM-1 as an effector of PtdIns(4,5)P2 to promote phagosomal sealing. MTM-1 coordinates with the class II PI3 kinase PIKI-1 to control PtdIns3P levels on unsealed phagosomes. The SNX9 family protein LST-4 is required for sealing, and its association with unsealed phagosomes is regulated by PtdIns(4,5)P2, PIKI-1, and MTM-1. Loss of LST-4 or its retention on phagosomes disrupts sealing and suppresses PtdIns3P accumulation, indicating close coupling of the two events. Our findings support a coincidence detection mechanism by which phagosomal sealing is regulated and coupled with conversion from PtdIns(4,5)P2 enrichment on unsealed phagosomes to PtdIns3P enrichment on fully sealed phagosomes.