SYDNEY, Australia — The Australian government said on Friday that it would send spy planes to help the Philippine armed forces who are fighting to recapture the southern city of Marawi, where the military is battling militants for control.

Extremists from the Abu Sayyaf and Maute groups seized part of the city last month, beginning a wave of violence and displacing tens of thousands of residents. Philippine officials, citing intelligence information, said Friday that two militants believed to have backed a siege of the city have been killed in the fighting.

Two military planes from Australia will provide surveillance support to the Philippine armed forces, said the Australian minister of defense, Marise Payne.

“The regional threat from terrorism, in particular from Daesh and foreign fighters, is a direct threat to Australia and our interests,” Ms. Payne said, using the Arabic acronym for the Islamic State. “Australia will continue to work with our partners in Southeast Asia to counter it.”