Maldives former President Mohamed Nasheed shares a moment as a Sri Lankan Special Task Force soldier stands guard next to him at a hotel in Colombo, Sri Lanka September 24, 2018. REUTERS/Dinuka Liyanawatte

MALE (Reuters) - The Maldives’ Supreme Court on Tuesday stayed exiled former president Mohamed Nasheed’s 13-year jail sentence on terrorism charges, allowing him to go home this week.

Nasheed has said he will return on Thursday.

The move comes days before newly elected President Ibrahim Mohamed Solih is scheduled to take his oath of office. Solih, a close ally of Nasheed, unseated former pro-China leader Abdulla Yameen in the Sept. 23 poll by a 16.8 percent margin.

Nasheed was sentenced to jail for ordering the abduction of a judge after a rushed and widely criticized trial in March 2015. He went into exile during a medical trip to Britain.

The Muslim-majority tourist paradise has been in political upheaval since February, when a state of emergency was imposed by Yameen to annul a court ruling that quashed the convictions of nine opposition leaders, including Nasheed.

The Maldives, located near key shipping lanes, has become a battleground for China and India as they compete for influence in the region.

The Supreme Court also reinstated 12 opposition lawmakers who were stripped of their seats when they defected to the opposition in 2017.