Two experiments with growing pigs were conducted to determine the effects of dietary P and Ca level, phytase supplementation, and ileal pectin infusion on ileal and fecal P and Ca balance, chemical composition of fecal mixed bacterial mass (MBM), and bacterial metabolic activity. Pigs (initial BW = 30 kg) were fitted with simple T-cannulas at the distal ileum. They were fed a low-P corn-soybean meal control diet (3 g of P/kg) or the control diet supplemented with monocalcium phosphate (MCP; 7 g of P/kg; Exp. 1) or 1,000 FTU phytase/kg (Exp. 2). The daily infusion treatments consisted of 60 g of pectin dissolved in 1.8 L of demineralized water or 1.8 L of demineralized water as the control infusion, infused via the ileal cannula. In each experiment, 8 barrows were assigned to 4 dietary treatments according to a double, incomplete 4 x 2 Latin square. The dietary treatments in Exp. 1 were the control (Con-) diet with water infusion; the control (Con+) diet with pectin infusion; the MCP diet with water infusion; and the MCP diet with pectin infusion. In Exp. 2, the pigs received the same Con- and Con+ treatments as in Exp. 1 and, in addition, the phytase-supplemented diet in combination with water or pectin infusion. After a 15-d adaptation period, feces were collected for 5 d followed by ileal digesta collection for 24 h. In Exp. 1, supplemental MCP increased (P </= 0.003) ileal and fecal P and Ca recovery as well as P and Ca content of the MBM. Pectin infusion increased the N content of the MBM (P = 0.054) and polygalacturonase activity (P = 0.032) in feces. In addition, pectin decreased (P = 0.049) ileal and tended (P < 0. 079) to increase fecal VFA concentrations. In Exp. 2, phytase decreased ileal and fecal P recovery (P < 0.001) and the P content of the MBM (P = 0.045), whereas the N content of the MBM (P = 0.094) and fecal cellulase activity (P = 0.089) tended to decrease. Similarly, pectin infusion decreased (P = 0.036) fecal cellulase activity but increased (P < 0.001) polygalacturonase activity. In conclusion, these data indicate that bacterial P and Ca assimilation and metabolic activity depend on P and Ca availability in the large intestine and on the availability of fermentable substrate, such as pectin. Thus, increasing dietary P and Ca levels increases bacterial P and Ca assimilation due to greater intestinal P and Ca availability, whereas decreasing intestinal P availability for bacteria through phytase addition to low-P diets reduces bacterial P incorporation and seems to decrease bacterial activity.