Associated Press photo by Brendan Smialowski -- U.S. Secretary of State John Kerry, center, walks with his bodyguards towards a plane on Monday at Jordan's Queen Alia International Airport, in Amman, Jordan.

Associated Press photo by Brendan Smialowski -- Iraqi Prime Minister Nouri al-Maliki meets with U.S. Secretary of State John Kerry in Baghdad.

Associated Press photo by Brendan Smialowski -- U.S. Secretary of State John Kerry, left, speaks with Sayyed Amar Al-Hakim, head of Supreme Islamic Council, during a meeting on Monday in Baghdad. Kerry flew to Baghdad on Monday to meet with Iraq's leaders and personally urge the Shiite-led government to give more power to political opponents before a Sunni insurgency seizes more control across the country and sweeps away hopes for lasting peace.

Kerry urges political reform in Iraq

Associated Press photo by Brendan Smialowski -- U.S. Secretary of State John Kerry, center, walks with his bodyguards towards a plane on Monday at Jordan's Queen Alia International Airport, in Amman, Jordan.

Associated Press photo by Brendan Smialowski -- Iraqi Prime Minister Nouri al-Maliki meets with U.S. Secretary of State John Kerry in Baghdad.

Associated Press photo by Brendan Smialowski -- U.S. Secretary of State John Kerry, left, speaks with Sayyed Amar Al-Hakim, head of Supreme Islamic Council, during a meeting on Monday in Baghdad. Kerry flew to Baghdad on Monday to meet with Iraq's leaders and personally urge the Shiite-led government to give more power to political opponents before a Sunni insurgency seizes more control across the country and sweeps away hopes for lasting peace.

BAGHDAD — U.S. Secretary of State John Kerry on Monday urged Iraq’s top Shiite leaders to give more government power to political opponents before a Sunni insurgency seizes more control across the country and sweeps away hopes for lasting peace.

The closed-door meeting between Kerry and Iraqi Prime Minister Nouri al-Maliki was not expected to be friendly, given that officials in Washington have floated suggestions that the Iraqi premier should resign as a necessary first step toward quelling the vicious uprising.

Nor will it likely bring any immediate, tangible results, as al-Maliki has shown no sign of leaving and Iraqi officials have long listened to — but ultimately ignored — U.S. advice to avoid appearing controlled by the decade-old specter of an American occupation in Baghdad.

Still, Kerry appeared encouraged after the discussion with al-Maliki, which ran for a little over 90 minutes and was held in the same complex where an Iraqi journalist threw a shoe at former President George W, Bush as an insult in 2008.

Walking to his motorcade after the meeting, Kerry said “that was good.” He was being escorted by Foreign Minister Hoshyar Zebari. Kerry also met with the influential Shiite cleric, Ammar al-Hakim, and with Parliament Speaker Osama al-Nujaifi and Deputy Prime Minister Saleh al-Mutlaq, the nation’s two highest-ranking Sunnis.

Iraqi officials briefed on the Kerry’s talks with the Iraqi prime minister said al-Maliki urged the United States to target the militants’ positions in Iraq and neighboring Syria, citing training camps and convoys with airstrikes. The officials said Kerry responded by saying a great deal of care and caution must be taken before attacks are launched to avoid civilian casualties that could create the impression that Americans are attacking Sunnis.

The officials spoke on condition of anonymity because they were not authorized to speak to the media.

President Barack Obama, in a round of television interviews that aired Monday in the U.S., said al-Maliki and the Iraqi leadership faces a test as to whether “they are able to set aside their suspicions, their sectarian preferences for the good of the whole.”

“And we don’t know,” Obama said. “The one thing I do know is that if they fail to do that then no amount of military action by the United States can hold that country together.”

After suffering together through more than eight years of war — which killed nearly 4,500 American troops and more than 100,000 Iraqis — Washington and Baghdad are trying to shelve mutual wariness to curb the very real prospect of the Mideast nation falling into a fresh bout of sectarian strife.

A day earlier, in Cairo, Kerry said Iraq had reached a “critical moment” and urged leaders to rise above sectarian disputes to create a new government that gives more power to Sunnis and Kurds. Both groups — which together make up about 40 percent of Iraq’s population — accuse al-Maliki of blocking them from holding equal authority in what is designed as a power-sharing government.

He was there in part to meet with Egyptian President Abdel-Fattah el-Sissi to and discuss a regional solution to end the bloodshed by the insurgent Islamic State of Iraq and the Levant, or ISIL.

Kerry arrived in Baghdad just a day after the Sunni militants captured two key border posts, one along the frontier with Jordan and the other with Syria, deepening al-Malliki’s predicament. Their latest victories considerably expanded territory under the militants’ control just two weeks after the al-Qaida breakaway group started swallowing up chunks of northern Iraq, heightening pressure on al-Maliki to step aside.

The offensive by ISIL takes the group closer to its dream of carving out an Islamic state straddling both Syria and Iraq. Controlling the borders with Syria will help it supply fellow fighters there with weaponry looted from Iraqi warehouses, boosting its ability to battle beleaguered Syrian government forces.

If the Sunni insurgents succeed in their quest to secure an enclave, they could further unsettle the already volatile Middle East and serve as a magnet for Jihadists from around the world.

The militants’ stunning battlefield successes in the north and the west of Iraq have laid bare the inadequacies of the country’s U.S.-trained forces. In the north, troops fled in the face of advancing militants, abandoning their weapons, vehicles and other equipment. In some cases in the west, they pulled out either when the militants approached or when they heard of other towns falling.

Sunday’s capture by the militants of crossings bordering Jordan and Syria followed the fall on Friday and Saturday of the towns of Qaim, Rawah, Anah and Rutba, all of which are in Sunni-dominated Anbar province, where the militants have since January controlled the city of Fallujah and parts of the provincial capital, Ramadi.

Even before U.S. troops left Iraq for good at the end of 2011, a merciless Sunni insurgency was pounding the country with car bombs, roadside explosions, suicide bombings and drive-by assassinations, mainly targeting the Shiite government, its security forces and Shiite pilgrims. Since the start of this year, and peaking this month, ISIL has overtaken several cities in Iraq’s west and north, and over the past weekend was controlling several main border crossings between Iraq and Syria.

The three-year civil war in Syria — where Sunni rebels are fighting to overthrow President Bashar Assad, whose Alawite sect is an offshoot of Shiism — emboldened Iraqi insurgents who regularly traverse the porous border to gain recruits, funding and weapons, and battlefield confidence. Years of political instability in Baghdad fueled anger against the Shiite-led government from Sunnis who felt powerless and saw their leaders targeted by al-Maliki’s security forces.

A senior State Department official said the insurgents’ recent march on Baghdad has been slowed, although concerns remain that ISIL will attack the golden-domed Shiite shrine to the Imam al-Askari in Samarra. That city, in Sunni territory in north-central Iraq, was the site of a 2006 bombing that triggered the worst of the war’s sectarian fighting. Last week, Senate Majority Leader Harry Reid declared that Iraq is currently in a civil war.

The official said Kerry on Monday would not ask al-Maliki to resign, as some in the U.S. and Sunni Arab states in Mideast have demanded, because “it’s not up to us.”