The Philippine president flew for the first time Thursday to a besieged southern city to cheer troops who have been trying to quell a nearly two-month uprising by IS group-linked militants, who he warned were plotting to attack other cities. Clad in a camouflage uniform, President Rodrigo Duterte gave a talk to troops and inspected recovered rebel rifles and other weapons in a military camp in Marawi city that is outside of the battle zone but remains dangerous because of stray bullets. His past attempts to fly to the lakeside city were aborted because of bad weather. "The soldiers and police are very happy over his visit because this proves that the president is very firm, very dedicated in supporting most specially the operations here," military spokesman Lt. Col. Jo-ar Herrera told reporters. Duterte thanked the troops for their heroism and sacrifices, Herrera said. Duterte told Congress in a letter this week that even though troops have regained control of much of Marawi and killed hundreds of militants, "the rebellion persists and a lot more remains to be done to completely quell the same." The militants' leadership, he said, remains largely intact and has funded diversionary attacks on other southern cities. The seven-page letter, a copy of which was seen by reporters Thursday, aims to convince lawmakers to extend Duterte's 60-day declaration of martial law in the south until the end of the year. The statements in the letter appear to differ from his assurance last week that the Marawi crisis, the most serious he has faced so far, could end in 10 to 15 days. In a separate report to the Senate, the military said the attackers' main leader, Isnilon Hapilon, "allowed the escape of 96 young recruits fighting in Marawi and instructed them to continue fighting outside Marawi." Waving IS group-style black flags, the heavily armed fighters stormed into Marawi, a center of Islamic faith in the south of the predominantly Roman Catholic nation, on May 23, occupying buildings, houses and mosques and taking hostages. Several foreign fighters, including 20 Indonesians and a Malaysian financier known as Mahmud bin Ahmad, joined the insurrection, the president said. Officials say at least 565 people, including 421 militants and 99 soldiers and policemen, have been killed in the worst urban uprising by Muslim militants in the volatile south in decades. Nearly half a million residents have been displaced in Marawi and outlying towns by the fighting. Duterte wrote in his letter that the leadership of the Marawi siege "largely remains intact despite the considerable decline in the number of rebels fighting in the main battle area." Other radical armed bands "are ready to reinforce Isnilon Hapilon's group or launch diversionary attacks and similar uprisings elsewhere," he said. Intelligence reports that Hapilon sent funds and ordered allied militants to launch attacks in key cities across the south have been validated, he said. The attackers' lasting power and large arsenal of weapons have surprised Duterte and his top security officials, who acknowledged they underestimated the combat strength of the militants and their preparations, including the stockpiling of assault firearms in lakeside Marawi. Troops long used to fighting insurgents in the jungles have struggled to rout the gunmen from Marawi's dense urban sprawl. Despite the large number of troops and checkpoints around the city, "there have been reported entries of reinforcements, weapons, ammunitions and other logistical supplies from outside Marawi city through clandestine routes," Duterte told the lawmakers. Followers of local politicians have backed the siege, which was partly funded by drug money, he said. The crisis has sparked alarm that the IS group may be gaining a foothold in Southeast Asia, through allied local militants, as it faces major setbacks in Syria and Iraq. The United States and Australia have deployed surveillance planes to Marawi, and China has provided weapons for Filipino troops, including those fighting in the besieged city.