PROBLEM TO BE SOLVED: To provide a method for separating a bacteriostatic or antibacterial agent from milk or whey.SOLUTION: There is provided a bacteriostatic or antibacterial agent containing components obtained from milk or whey as essential components having properties of following (A) and (B). (a) Property of passing an ultrafiltration membrane having a cut-off molecular weight of less than 20,000 Da. (2) The content of lactose is 10% or less. (3) The content of fat is 1% or less. (4) The content of free amino acid is 1% or less. (5) The content of organic acid is 1% or less. There is provided a method for obtaining such components including a method for absorbing to a synthetic absorbent resin after removing fat and proteins from milk or whey and extracting by a water-containing organic solvent, and the method of removing proteins is obtained by using the ultrafiltration membrane having the cut-off molecular weight of less than 20,000 Da for example.