In this paper, a nonlinear adaptive control of generator excitation and Static Synchronous Compensator (STATCOM) is proposed to enhance the transient stability and voltage regulation of an electrical power system. The proposed controller is designed via an adaptive immersion and invariance (I&I) methodology. In particular, a nonlinear model of the power system including two unknown constant parameters, namely an unknown damping coefficient and an unknown perturbation in mechanical power, is considered. It will be shown that the adapive I\&I control law and the parameter adaptation law proposed can accomplish the convergence of the system states to the real value of unknown parameters. Additionally, they can achieve transient stabilization along with voltage regulations. The adaptive I&I controller is validated using a simulation study on a single-machine infinite bus (SMIB) power system and compared with the standard I&I controller and an adaptive backstepping controller. Simulation results are given to indicate the effectiveness of the proposed controller for the transient stabilization and voltage regulation.