WASHINGTON — Secretary of State John F. Kerry pledged Sunday to “do everything that is possible” to help Iraqi government forces in an escalating battle against al-Qaida-linked insurgents in western Anbar province, but he said the Obama administration will not send American troops back to Iraq.

After heavy fighting, Sunni Muslim militants fighting under the banner of al-Qaida reportedly have in effect taken control of Fallujah and secured large parts of Ramadi, the province’s most important cities. Government forces and allied tribal groups have vowed to retake the area.

The losses have undermined Prime Minister Nouri al-Maliki’s Shiite-led government in Baghdad. That government has struggled to maintain security since the last U.S. troops were withdrawn in December 2011, after al-Maliki and the White House failed to reach agreement on a continuing U.S. presence.

Kerry said Washington was concerned about the resurgence of al-Qaida in Anbar, where U.S. troops saw some of the bloodiest combat during the insurgency that erupted after the American invasion of Iraq in 2003.

“We are not, obviously, contemplating returning,” Kerry told reporters in Jerusalem, where he is on a Middle East trip. “We’re not contemplating putting boots on the ground. This is their fight, but we’re going to help them in their fight.”

He said the Obama administration plans to be in “close contact with all of the Iraq political leaders,” including tribal allies from Anbar. “We are going to do everything that is possible to help them.”

He did not say what Washington plans to do, however, and relations with al-Maliki’s government are tense. The Pentagon has sent Baghdad dozens of Hellfire air-to-ground missiles and small, unarmed surveillance drone aircraft in recent weeks, but administration officials said last week that they don’t plan any further military aid for now.

Kerry said the growing violence in Anbar, which borders Syria, has ominous implications for countries regionwide.

“This is a fight that is bigger than just Iraq. … The fighting in Syria is part of what is unleashing this instability in the rest of the region,” he said.

Violence also erupted in Baghdad on Sunday. Three car bombs and two roadside bombs exploded in several areas, killing at least 18 people and wounding dozens.

In Washington, Tony Blinken, the deputy national security adviser, spoke by telephone with Iraqi National Security Adviser Faleh Fayyad. Blinken expressed U.S. support for the Iraqi forces fighting militants from the al-Qaida-backed Islamic State of Iraq and the Levant, according to a White House statement.

“Senior officials from the White House, the State Department and the United States Embassy in Baghdad remain in regular communication with a wide range of Iraqi officials to support ongoing efforts against ISIL, and to encourage coordination between Iraqi security forces and the people they serve,” the White House said.

Earlier, the State Department issued a statement condemning what it called the militants’ “barbarism against civilians of Ramadi and Fallujah” and against Iraqi security forces.

Iraqi military leaders said Sunday that they were aiming to remove the militants within two to three days, working with pro-government Sunni tribes in the region. They said the military is mainly proving aerial cover and ground logistics.

“There will be no retreat until we eliminate this gang and rid the people of Anbar of their evil acts,” al-Maliki said, according to wire reports.

Two Republican critics of the decision to withdraw all U.S. troops, Sens. John McCain of Arizona and Lindsey Graham of South Carolina, said in a joint statement that the fighting was “predictable” because al-Qaida was rushing to fill a security vacuum in Iraq left by the U.S. departure.

“While many Iraqis are responsible for this strategic disaster, the administration cannot escape its share of the blame,” they said.