A control system for actuating a trailer braking system on a trailer is disclosed. The control system includes a trailer brake controller in communication with an antilock braking controller and an electronic stability controller of a towing vehicle to receive a wheel speed, a brake pressure, a yaw rate, a lateral acceleration, and a steering angle. The trailer brake controller utilizes the wheel speed, the brake pressure, the yaw rate, the lateral acceleration, and the steering angle to determine the attitude of the towing vehicle, and to calculate a desired braking force for the trailer. The trailer brake controller sends an appropriate output to actuate the trailer braking system on the trailer to stabilize the towing vehicle during extreme braking conditions.