Preparation of BMI monomers containing phosphate and phosphonate structure to enhance the flame retardant and toughness of BMI.