Forest fires represent a real threat to human lives, ecological systems, and infrastructure. Many commercial fire detection sensor systems exist, but all of them are difficult to apply at large open spaces like forests because of their response delay, necessary maintenance needed, high cost, and other problems. In this paper a forest fire detection algorithm is proposed, and it consists of the following stages. Firstly, background subtraction is applied to movement containing region detection. Secondly, converting the segmented moving regions from RGB to YCbCr color space and applying five fire detection rules for separating candidate fire pixels were undertaken. Finally, temporal variation is then employed to differentiate between fire and fire-color objects. The proposed method is tested using data set consisting of 6 videos collected from Internet. The final results show that the proposed method achieves up to 96.63% of true detection rates. These results indicate that the proposed method is accurate and can be used in automatic forest fire-alarm systems.