Root-knot nematodes (Meloidogyne incognita) are responsible for causing great damage to tomato crop, demanding various specific management strategies. In order to find an effective alternative to control this pathogen, the aim of this study was to test the rosemary (Rosmarinus officinalis) extract in formulation with hydrogel. The formulation was used at doses of 0.25; 0.50; 0.75; 1.00 and 1.25 g per pit, at seedling transplanting, and as controls, 1.25 g of hydrogel (without rosemary) and absolute control (only water). The nematological variables evaluated were number of egg masses, number of galls, total nematodes per root, and reproduction factor. To verify whether plant resistance induction occurred, root samples were collected at different time periods and the activity of the enzymes phenylalanine ammonia-lyase (FAL), peroxidase (POX) and polyphenoloxidase (PFO) were measured. For the nematological variables, we verified proportional dose-dependent reduction of nematode infection, indicating its effectiveness in disease control. For the enzymes, FAL showed no significant change in any treatment or time period tested, whereas POX and PFO showed peaks of activity in different treatments and times, mainly at the dose 1.25 g of the formulation. These results indicated that the control of M. incognita in tomato crop can be achieved by a direct effect of the rosemary extract on the nematode population as well as by plant resistance in response to the pathogen action.