Following the detection of phenylketonuria (PKU) in an infant, the primary treatment to prevent mental retardation is a strict, lifelong diet that limits phenylalanine intake. This typically involves avoiding high-protein foods such as meat, dairy, and certain grains, while incorporating a special formula that provides necessary nutrients without phenylalanine. Regular monitoring of blood phenylalanine levels is also essential to ensure the effectiveness of the dietary management. Early intervention is crucial for optimal outcomes.