UNITED NATIONS — The United Nations Security Council voted unanimously Wednesday to lift sanctions against Eritrea following its thaw in relations with Ethiopia and other neighboring countries, but kept an arms embargo on Somalia and a ban on trade in charcoal, a key source of money for Shabab militants.

The resolution approved by the council, the United Nations’ most powerful body, commended “efforts toward peace, stability and reconciliation in the region” led by Ethiopia’s reformist prime minister, Abiy Ahmed, who came to power in April and accepted an international commission’s border decision favoring Eritrea.

Ethiopia is a regional power and actions by the country’s leader set off several diplomatic thaws, including one between Eritrea and Somalia. Leaders of Djibouti and Eritrea, which also had a turbulent relationship after border clashes, met with the help of Ethiopia, though there has been no breakthrough.

Mr. Ahmed’s office said after the vote that the lifting of sanctions will have far-reaching effects in improving stability and building peace in the Horn of Africa.