NAIROBI, Kenya — Ethiopia’s prime minister Abiy Ahmed warned in his speech accepting the Nobel Peace Prize in Oslo on Tuesday that social media is now being used to sow “hate and division” and undermine Ethiopia’s delicate political transition.

As he accepted a Nobel Peace Prize for ending a long war between his country and neighboring Eritrea in the Horn of Africa, Mr. Abiy said that digital platforms are sabotaging the development of an “inclusive” political atmosphere in Ethiopia.

Mr. Abiy was awarded the Nobel Peace Prize for brokering the end to the long-running border dispute with Eritrea and for ushering in a new era of diplomatic and trade relations.

The Nobel committee also acknowledged the significant economic and political changes that he has introduced in Ethiopia since ascending to power.