NEW DELHI  The world’s last Hindu king, Gyanendra of Nepal, was told to step down from his throne in 15 days, as a newly elected assembly led by former Maoist guerrillas voted late Wednesday to transform the country into a republic.

The vote by the special assembly, elected last month, formalizes the steady dissolution of the 239-year-old monarchy in Nepal. But exactly when and how the king would leave Narayanhity, the main palace in the capital, Katmandu, was not clear.

Gyanendra has made no public statements in recent weeks about his plans, though suspected royalists have made their disappointment known by setting off small bombs in Katmandu. Three went off Wednesday, injuring no one. On Tuesday a blast injured six; a royalist organization called Ranabir Sena claimed responsibility.

Government officials in recent days have urged the king, a businessman with interests in tobacco and hotels, to move out of the pink concrete Narayanhity and into his own high-walled private residence nearby  or face eviction by force.