Ernest Bai Koroma ruled between 2007 and 2018. Photo / AA

Sierra Leone's former president Ernest Bai Koroma, charged for his alleged role in what authorities call an attempted coup, left the country and arrived in Nigeria on Friday.

Koroma, who led the West African nation from 2007 to 2018, had received permission from judicial authorities on Wednesday to spend a maximum of three months in Nigeria for medical treatment.

Current president Julius Maada Bio called the court's decision a "humanitarian gesture" during an address to the nation on Thursday evening.

Koroma landed in Abuja on Friday afternoon, welcomed by National Security Adviser Nuhu Ribadu and the president of the ECOWAS Commission Omar Alieu Touray, according to an AFP journalist.

Koroma's adviser Sheriff Mahmud Ismail had said earlier that the former head of state boarded a Nigerian Air Force plane, without specifying the flight's destination.

Sierra Leone's High Court earlier this week authorised the ex-president to undergo medical treatment in Nigeria "for at the most three months from the date of this order and (on condition) that his sureties should provide regular medical updates, signed and duly authorised".

Koroma, who has effectively been under house arrest since December 9, was charged in early January with four offences including treason in relation to the events in late November.

On November 26, armed attackers stormed a military armoury, two barracks, two prisons and two police stations, clashing with security forces.

Twenty-one people were killed and hundreds of prisoners escaped before authorities were able to regain control after what they deemed a coup attempt by members of the armed forces.

At least 80 people were arrested in connection with the clashes, most of them military personnel.

Click here to follow our WhatsApp channel for more stories.

TRT Afrika and agencies