Forest fires have become a major threat around the world, causing many negative impacts on human habitats and forest ecosystems. Climatic changes and the greenhouse effect are some of the consequences of such destruction. Interestingly, a higher percentage of forest fires occur due to human activities. Therefore, to minimize the destruction caused by forest fires, there is a need to detect forest fires at their initial stage. This paper proposes a system and methodology that can be used to detect forest fires at the initial stage using a wireless sensor network. Furthermore, to acquire more accurate fire detection, a machine learning regression model is proposed. Because of the primary power supply provided by rechargeable batteries with a secondary solar power supply, a solution is readily implementable as a standalone system for prolonged periods. Moreover, in-depth attention is given to sensor node design and node placement requirements in harsh forest environments and to minimize the damage and harmful effects caused by wild animals, weather conditions, etc. to the system. Numerous trials conducted in real tropical forest sites found that the proposed system is effective in alerting forest fires with lower latency than the existing systems.