WASHINGTON - President Barack Obama has signed into law a measure that keeps the wars in Iraq and Afghanistan from running out of money.

The $106 billion spending bill also includes money to fight swine flu and to pay all U.S. debts to the United Nations, mainly for peacekeeping, incurred since 1999.

Obama says the spending is important and thanked Congress for putting politics aside.

Obama says the legislation will pay for winding down the war in Iraq and defeating terrorists in Afghanistan.

The White House and its Democratic allies insist that this will be the last time Congress will be compelled to pass an emergency war bill that is outside the normal budget process and thus goes directly to an increase in the national debt.