Guled Ibrahim checked Facebook constantly in the early morning hours Wednesday, anxious for news of Somalia's presidential election half a world away.

Ibrahim finally saw what he wanted: After two rounds of voting, incumbent President Hassan Sheikh Mohamud conceded defeat and Mohamed Abdullahi Mohamed, a former prime minister who holds dual Somali-U.S. citizenship, emerged as the winner. His victory prompted an outpouring of support from the Somali community in Minnesota, where many shared a sense of optimism and relief.

"I never met this guy, but I am so excited," said Ibrahim, of St. Louis Park.

Mohamed, known by his nickname "Farmajo," was born in Mogadishu but came to the United States in the 1980s. He did not live in Minnesota, but he has visited, and local residents campaigned for him through social media, noting his efforts to root out Al-Shabab and government corruption. They held a party "to show the president Minnesota supports him" Thursday in Minneapolis.

"Victory, victory, victory!" said Ayan Isse, executive director of the nonprofit Women Child Safe Center in Minneapolis. "A new dawn has begun for us."

Mohamed was sworn in immediately Wednesday, and many Somalis in Minnesota said the peaceful transition showed an end of tribal division and a move toward democracy in a country that has struggled for more than a quarter-century.

They also said they felt a personal connection as a fellow Somali-American was elected to lead the country at a time when ties between the United States and Somalia need mending.

President Donald Trump issued an executive order — stayed by an appeals court Thursday — pausing refugee resettlement and barring travelers from Somalia and six other majority-Muslim countries from entering the United States. And during the presidential campaign, Trump suggested Somali refugees put a strain on Minnesota.

But Abdirizak Bihi, a Somali community activist, said he has high hopes Mohamed can build a relationship between Somalia and the United States.

"It's very important that he has a connection to the United States," Bihi said. "America is a leader in the international community and Somalia needs the international community more than ever to rebuild."

Senators Al Franken and Amy Klobuchar, D-Minn., issued statements saying the peaceful transition of power in Somalia and Mohamed's years spent in the United States were important to the two countries' relationship.

"I look forward to working with his new administration on important issues that impact both of our countries, especially those that affect Somali-Minnesotans and their families living in Somalia," Franken said.

Klobuchar said: "Our Somali community contributes so much to the cultural and economic vitality of our state. I am committed to ensuring that the United States continues to help Somalia build a successful and prosperous future."

Farhio Khalif, executive director of Minneapolis nonprofit Voice of East African Women, said Somalia has been plagued by terrorism and that some young people have turned to extremism.

Even the election was threatened by fears of an Al-Shabab attack. Instead of a vote by the population at large, only parliament members voted for president.

But Khalif said Mohamed will need to do more than fight terrorism. "I hope he creates jobs," Khalif said. "We want a leader who treats our women and our youth with passion and gives them the hope and the future."

Faiza Mahamud • 612-673-4203