WASHINGTON - House and Senate negotiators have reached agreement on a $585 billion defense policy bill that provides funds to expand the U.S. mission in Iraq to counter Islamic State militants and gives the military the authority to train moderate Syrian forces.

The overall legislation endorses President Obama's latest request to Congress in the four-month-old war against Islamic extremists who brutally rule large sections of Iraq and Syria. Obama sought billions for the stepped-up operation and the dispatch of up to 1,500 more American troops; the bill provides $5 billion.

The administration also pressed for reauthorization of its plan to train and equip moderate Syrian rebels battling the forces of President Bashar al-Assad, with that mandate expiring Dec. 11. The legislation would extend that authority for two years.

"The choice of not supporting them is unacceptable," said Sen. John McCain (R., Ariz.), a member of the Armed Services Committee who kept up his criticism that the Obama administration lacks a strategy in Iraq and Syria.

"Completely devoid of strategy," McCain said.

The bill would provide the core funding of $521.3 billion for the military, including a 1 percent pay raise for the troops and money for aircraft, ships and war-fighting equipment. It also includes $63.7 billion for overseas operations in Afghanistan and Iraq, where fighting has lasted more than a decade.

Senior House and Senate aides described the details of the legislation but were not authorized to discuss the bill on the record ahead of the official release of the measure.

The House is expected to vote on the bill this week, and the Senate will consider it next week. The sweeping bill is one of the few bipartisan measures in Congress that has successfully made it to the president's desk for more than half a century.

The bill leaves in place restrictions on the transfer of terror suspects from the federal prison at Guantanamo Bay, Cuba, to the United States or other countries.

Sen. Carl Levin (D., Mich.), chairman of the Senate Armed Services Committee, had pushed to give the president additional authority to transfer detainees, calling it a "path to close Guantanamo." But House and Senate negotiators balked at any attempts to ease the restrictions.

White House spokesman Josh Earnest indicated that the Guantanamo restrictions would not be enough to draw a presidential veto.

The bill also takes steps to combat sexual assault in the ranks.

Lawmakers rebuffed several of the cost-saving proposals that the Pentagon insists are necessary in a time of reduced defense spending.

The bill would prohibit the retirement of the A-10 Warthog, the close-air support plane often described as ugly but invaluable.