The IoT-based Fire Detection and Prevention System in Farmland" project seeks to develop an innovative and robust solution to minimize the risks posed by fire outbreaks in agricultural areas. Leveraging the capabilities of the Internet of Things (IoT), this system provides continuous, real-time monitoring of farmland conditions to enable early detection of fire hazards. A network of interconnected sensors is strategically deployed across the farmland to measure environmental parameters such as temperature, and smoke levels. These sensors transmit the collected data to a central control unit, where it is processed by an advanced algorithm designed to detect potential fire threats. Upon detection, the system triggers an automatic response using relays that activate fire suppression mechanisms such as sprinkler systems or water pumps using motors, effectively containing and preventing the spread of fire. Additionally, the system includes a display module that provides real-time alerts and updates to farmers and relevant authorities, ensuring they can take immediate action when necessary. This solution not only enhances safety but also reduces crop damage and financial losses by addressing fire threats before they escalate.