BAGHDAD — Defense Secretary Ashton B. Carter offered Iraq expanded military assistance during a visit to Baghdad on Wednesday as the Obama administration seeks new ways to boost the country’s efforts against the Islamic State.

Carter’s visit, his third stop on an end-of-year Middle East tour, comes as Iraqi forces seek to push deeper into Ramadi, the capital of the western Anbar province, which has been in the grip of Islamic State fighters since May.

The military operation in Ramadi is an important test of Prime Minister Haider al-Abadi’s ability to muster government forces against the group and of President Obama’s strategy of relying on local partners to battle a militant organization that has spawned affiliates from Libya to Afghanistan.

Victory in Ramadi – just 80 miles west of Baghdad – would allow Iraqi security forces to refocus on the northern city of Mosul, considered the Islamic State’s de facto capital in Iraq and the prize in the U.S.-backed campaign there.

“We do want to help you build on your success in Ramadi, to move toward Mosul,” Carter told Abadi at a meeting at the government palace in Baghdad’s fortified Green Zone.

‘YOUR VICTORY,’ MINISTER TOLD

“It’s your victory, and it’s your advance,” he said later in a meeting with Defense Minister Khaled al-Obeidi. “But we look forward to . . . increased opportunities, at your request, with your permission, to assist you in making that move.”

Iraqi officials did not appear ready to seize upon all forms of U.S. assistance on offer. Their decision to refrain, at least for now, from requesting attack helicopters publicly proposed by Carter last week suggests that American plans to provide additional support to local forces will be subject once more to the contours of Iraqi politics.

Speaking to reporters after talks with Abadi, Carter said the Iraqi prime minister made no “specific request” for attack helicopters to be used in the Ramadi campaign. But they “certainly might be taken up” for future battles, he said.

Last week, Carter told Congress that the United States would provide attack helicopters or combat advisers if they are requested by the Iraqi government and if circumstances indicate a need.

Use of helicopters such as Apache gunships would allow U.S. forces to provide immediate, accurate close air support to Iraqi troops, acting more effectively as an extension of those ground forces than fixed-wing aircraft could.

HELICOPTER DECISION RISKY

But a decision to employ the helicopters – like a move to embed U.S. advisers with lower-level Iraqi units – would draw the United States even deeper into the war and would expose U.S. troops to greater risk.

U.S. officials said military leaders in both countries had deemed such steps unnecessary for now as Iraqi forces make some headway in Ramadi.

“It’s not either Gen. MacFarland’s judgment or the prime minister’s judgment that they’re needed right now for the completion of the fight in Ramadi,” Carter said, referring to Army Lt. Gen. Sean MacFarland, the top U.S. commander for Iraq and Syria. “That does not mean that they won’t make a difference in the future.”

The stakes are high for Abadi, who must prove his government can regain control of militant-controlled areas.