The electric fireplace in our RV caught on fire. A visible flame was seen behind the fireplace glass near the thermostat display on the right side of the fireplace. Visible smoke and burning smell observed from the upper right vents above the control panel buttons. The fireplace unit itself had an audible alarm, in addition to the RV smoke detectors that were triggered. We were inside the RV when this occurred, and once smoke and flame were observed, we immediately extinguished the fire by shutting off the master power breaker, and promptly removed the fireplace unit from the cabinet prior to any damage to the RV.