Upon assuming duties as sultan, Mahmud Syah II undermined stability in the state due to his erratic behavior.
The text suggests that Mahmud Syah II, upon becoming sultan, caused a disruption in the stability of the state because of his unpredictable behavior.