A United Nations envoy who was recently ordered to leave Somalia said Thursday that its political tensions could devolve into conflict, while Somalia's U.N. ambassador said his country embraces international institutions but not individual conduct "detrimental" to the nation.

Both addressed the Security Council at a regularly scheduled discussion that took on new overtones after Somalia announced Tuesday it was expelling Nicholas Haysom. Somalia's government said Haysom overstepped diplomatic bounds by questioning the arrest of an extremist group defector-turned-political candidate.

The U.N. has said little in public about the flap. Deputy spokesman Farhan Haq said Thursday that the world body was seeking "further clarification" on the matter, but that Haysom continues to have Secretary-General Antonio Guterres' support.

Haysom himself didn't directly address his apparent ouster. But while he commended Somalia's progress on various political, economic and security initiatives, he said the deadly protests that followed the arrest of Mukhtar Robow "marred the process" and do "not bode well" for upcoming elections.

"Politics is complex in any nation," he noted, but in a country trying to enshrine a stable system after decades of strife, "there is a risk that complexity shifts to conflict."

The arrest also could affect the likelihood that other extremist group defectors will consider abandoning violence to pursue political change, Haysom suggested.

Somali Ambassador Abukar Dahir Osman, meanwhile, said the Horn of Africa nation appreciates the U.N.'s help but "distinguishes between the institutions that we are part of and individuals' conduct that has a detrimental effect on our fragile nation."

Somalia has said Robow — who was arrested days before a December election in which he was a leading candidate for a regional presidency — couldn't run because he hadn't completed a defection process. A former deputy leader of the al-Qaida-linked al-Shabab, one of Africa's deadliest Islamic extremist groups, he defected from in 2017 and surrendered to the government, which welcomed his defection.

But when he was arrested, Somalia's security ministry alleged that Robow failed to renounce extremist ideology and accused him of mobilizing armed forces.

Osman didn't mention Robow specifically on Thursday, but the ambassador said the potential election of "any individual with violent extremism history would represent a regressive step."

"While we strive to re-establish the rule of law and end (a) culture of impunity, we reject the criticism and attempt to rebrand the new terrorism as an ice-cream salesperson without redeeming themselves," Osman said.

Haysom, in a letter to Somali authorities, questioned the legal framework of Somalia's defection process and asked how Somali authorities were able to detain Robow beyond the normal 48 hours. Robow has been held in a prison since his Dec. 13 arrest.

Haysom's letter also questioned the circumstances surrounding civilian deaths during the protests and urged investigation.

The Security Council was discussing Somalia in a closed session later Thursday. It wasn't immediately clear whether the group would issue any statement.

After 30 years of civil war, extremist attacks and famine, Somalia established a functioning transitional government in 2012 and has since been working to rebuild.