NEW DELHI — The Maldives, the isolated scattering of islands caught in a geopolitical struggle between China, India and the West, were thrust into more uncertainty Sunday when voters appeared to have ousted the country’s autocratic president.

With votes still being tallied, local news organizations reported that Ibrahim Mohamed Solih, the opposition candidate, had beaten President Abdulla Yameen. Mr. Solih won 58 percent of the vote with about 97 percent of ballots counted, according to the independent news website mihaaru.com. Transparency Maldives, an election watchdog, said he had won “by a decisive margin.”

As Mr. Solih declared victory and his supporters danced in the street, observers held their breath as they waited to see what Mr. Yameen would do next.

His campaign had yet to concede by early Monday morning, and a spokesman for the Maldives’ Election Commission said official results would not be announced for a week, according to Reuters.