Prepupae of the black soldier fly (BSF) are a potential source of high value protein that could be incorporated in feed for monogastric farm animals. These prepupae are also rich in fat, with lauric acid (C12:0) as the predominant fatty acid, known for its antimicrobial effects on Gram positive bacteria. First, the effects of BSF fat on the porcine gut microbiota were assessed in vitro by simulating digestion in the upper small intestine of piglets. Different amounts of BSF fat were added to an incubation medium, which contained a synthetic diet, a phosphate buffer (pH 5) and a microbial inoculum from one donor piglet. The medium was incubated at 37°C for 4h. Using selective media, coliforms, D-streptococci, lactobacilli and total anaerobic bacteria were counted on aliquots taken at the end of the incubations. Second, weaned piglets were reared on diets including full-fat (4 and 8%) and defatted (5.4%) BSF prepupae and compared to a control diet (i.e. with soybean as protein and fat source). Next to the effects on gut microbiota, selected gut health parameters were investigated, performance was recorded and digestibility of the diets was calculated. In vitro, the prepupal fat at 0.58g C12:0/100mL, suppressed growth of lactobacilli, but the most substantial antibacterial effects were recorded against D-streptococci. At the highest inclusion level (equivalent to 0.87g C12:0/100mL), around 2 log fold reductions of D-streptococci were observed. From the animal trial, only 0.5 log fold reductions were observed for D-streptococci in the gut of piglets fed BSF containing diets. No differences were recorded for daily gain, feed intake and feed to gain ratio among treatments. The apparent fecal digestibility of the control feed did not differ significantly to that of the insect-containing feed (protein digestibility between 77 and 78% for all treatments). Whereas the ileal protein digestibility of the 8% full-fat BSF diet (67.4%) was lower than that of the control (69.7%), the values for the 4% full-fat and the defatted BSF diets were higher (73.3%). In conclusion, our trial with piglets showed that a substantial amount of soybean products (meal and/or toasted beans) can be replaced by BSF without adverse effects on performance. However, given that the current price of BSF prepupae is substantially higher than that of soybean, future research should focus on exploring the potential added value of BSF compared to conventional protein sources.