There are various software packages for the analysis of electromagnetic processes in the power system. According to the literature, the most widely used software package in the scientific and engineering world is the Electromagnetic Transients Program (EMTP). In this paper, a numerical model for the analysis of electromagnetic transients in the power system (PES) has been developed, based on the finite element technique (FET). The simplicity of the finite element technique is manifested in the fact that the problem of solving any mathematically described phenomenon in a certain area is reduced to solving the same phenomenon in a small part of that area. Such small parts of the area are called finite elements, and the process of division into finite elements is called discretization. The virtue of the finite element technique lies in the simplicity of the process of assembling local systems of equations of individual finite elements, as well as in its simple algorithmization. This process is transparent and efficient, so it is easy to automate it, that is, to build an algorithm for solving very complex systems using a simple process. As the most important part of the power system, in the first step, a numerical model of a synchronous generator in the time domain was developed, which is defined and treated as a finite element with three local nodes. The developed numerical model of a synchronous generator for the analysis of electromagnetic transients in the power system also includes the originally developed numerical model of the excitation regulator and the turbine regulator. Also, based on the appropriate mathematical models, numerical models of other parts of the power system (transformers, lines, equivalent networks, consumers) were developed, which were treated as separate finite elements in the calculation process. The system of differential equations of the generator and excitation regulator and the turbine are included in the numerical model by using the numerical integration of the above differential equations using the generalized trapezoidal rule ( -method). Therefore, with the help of this procedure, or -method, the system of differential equations is reduced to a system of algebraic equations in one time increment. The accuracy of the developed numerical model for the analysis of electromagnetic transients in the power system was confirmed by comparing the calculation results with the results obtained using the EMTP software package.