The United Nations announced Monday that the Yemeni Houthi rebels had agreed to eliminate their child soldiers. These children have been fighting by the thousands in the country’s civil war for seven years.

According to the U.N., the Houthis agreed to an “action plan” that would prevent children from being recruited or used in armed conflict. This included killing or maiming children, attacking schools and hospitals, and preventing them from using their names for recruitment. Stephane Dujarric, spokesperson for the U.N., said that rebels had committed to identifying and releasing children within six months.

Abdul Eluh Hajar was one of the top diplomats for the Houthis. He signed the agreement. At a ceremony in Sanaa, Yemen’s capital to celebrate the agreement, representatives from the U.N. children’s agency met with Houthi officials. It was a plan to safeguard children, according to the Houthis.

The U.N. stated that Yemen’s internationally recognized government has made similar commitments in several documents since 2014.

Virginia Gamba, U.N.’s top child protection official, described the Houthis’ action as “a positive, encouraging step.” However, she pointed out that the “most difficult part of this journey begins now.”

Gamba, who was a witness to Houthis’ pledge in New York, stated in a statement that the action plan must be fully executed and lead to tangible actions to improve the protection of children from Yemen.

According to the U.N. Nearly 3,500 children were confirmed to have been recruited and deployed in Yemen’s civil conflict. A senior Houthi military officer stated to The Associated Press that the group had already inducted 18,000 child soldiers into their army. Former child soldiers also told The News Cooperative that they had recruited boys as young 10 years old. A spokesperson for the Houthi military denied that there was any systematic recruitment of children under 18. He also stated that orders were given to reject children who attempted to join.

According to the U.N., more than 10200 children were killed or maimed during the conflict. It is not clear how many of these children may have been combatants.

The civil war in Yemen broke out when the Iran-backed Houthis took Sanaa and drove the government into exile. To restore power to the government, a coalition of Saudi-led forces, including the United Arab Emirates, joined the conflict in 2015.

According to war monitors, the conflict has claimed more than 14,500 civilian casualties and over 150,000 combatants. It also caused one of the most severe humanitarian crises in history.

The warring parties reached an agreement earlier this month to the first nationwide ceasefire in six years. The two-month-old pact was set to begin during Ramadan, the Muslim holy month. It raised hopes for building momentum towards peace.

Yemeni President Abed Rabbo Mansour Hadi announced last week that a new president’s council would manage the exiled government, and negotiate with the Houthis.

After years of fighting among anti-Houthi factions, Saudi Arabia and other countries welcomed the leadership transition. The development was dismissed by a spokesperson for the Houthi group as an “illegitimate” decision taken from far.