Lost brakes as I was trying to decelerate to make a left turn on FM 1472, still managed to come to a stop before hitting the traffic ahead of me that was also waiting to make a left turn. Smoke started to come out from the wheel wells. Put vehicle on parking, shut off engine, opened hood and found fire coming out from the back of the engine bay. Extinguished fire with a Fire extinguisher, and a few minutes later, a Fire Dept Truck arrived to hose it just to make sure it was properly extinguished. Waiting for Cause and Origin investigator from the insurance to inspect the vehicle.