BEIJING (Reuters) - China will reopen its embassy in Somalia after signs the East African country was making progress in its efforts to restore peace decades after the end of its civil war, the foreign ministry said on Monday.

Foreign Ministry spokesman Hong Lei said China will send a team to Somalia on July 1 to reopen the embassy, which was closed in 1991 as Somalia descended into chaos.

"China's reopening of the embassy in Somalia is a signal that China attaches great importance to relations with Somalia," Hong said at a daily briefing.

Once written off as a failed state, Somalia now has its most legitimate government for decades since President Hassan Sheikh Mohamud's election in 2012, but the government still struggles to exert influence beyond the capital and is plagued by recent attacks by al Shabaab.

China's announcement comes just over three weeks after the United States said it will appoint a new ambassador to Mogadishu for the first time since closing its embassy there 23 years ago.

Britain and Turkey have both opened embassies in Somalia and other countries, including Iran, are also vying for influence in the Horn of Africa nation.

China has made major investments in Africa, mainly in the natural resources sector. Africans broadly see China as a healthy counterbalance to Western influence but, as ties mature, there are growing calls from policymakers and economists for more balanced trade relations.

(Reporting by Sui-Lee Wee; Editing by Miral Fahmy)