MANILA — The Philippine Congress voted on Saturday to extend martial law in the southern part of the country, giving the military five more months to crush a rebellion there by Islamic State-inspired militants.

The decision, in a special session of Congress, comes two days before President Rodrigo Duterte is to deliver his annual state of the nation address, during which he is expected to outline his government’s achievements and plans.

Mr. Duterte had asked Congress, which is dominated by his allies, to approve his request to extend a proclamation placing the island of Mindanao under martial law for two months. The proclamation, which was set to expire on Saturday evening, was put in place as the military struggled to contain a rebellion by members of the Islamist groups Abu Sayyaf and Maute in the city of Marawi, which is on Mindanao.

The decision was largely expected, with Mr. Duterte controlling majorities in the 294-member House of Representatives and the 24-member Senate. In the House, 245 members voted yes, as did 16 senators.