WASHINGTON - President Barack Obama on Wednesday signed into law a $106 billion measure to keep the wars in Iraq and Afghanistan from running out of money that also includes $1.4 billion in economic and security assistance to Pakistan. The bill includes $79.9 billion to continue funding the two wars through September 30, 2009, and $7.7 billion to address the H1N1 (Swine) flu pandemic. The bill sets apart $707 million in economic assistance to Pakistan including $225 million for relief support of the internally dislocated persons (IDPs). The funding for Pakistan would be geared toward addressing the economic crisis, strengthen national and provincial governance, expand the rule of law, and improve access to and quality of education. Another $700 million has been allocated to improve Pakistans security forces capability under Pakistan Counterinsurgency Capability Fund, available Sep 30, 2009. The measure was nearly derailed by Obamas request for money to close the notorious US prison at Guantanamo Bay, Cuba, as well as for $108 billion in credit lines to back the International Monetary Fund (IMF) as it helps countries weather the global economic downturn. The legislation did not include $80 million Obama wanted for closing Guantanamo and bans releasing any detainees into the US through Sep 30. But it allows detainees to be brought to US soil for trial. Both Republican and Democratic lawmakers demanded the White House produce a detailed plan before closing the Guantanamo prison camp. Before the legislation passed, the administration rushed to release or transfer more than a dozen detainees. Despite fierce Republican opposition, Obama ultimately prevailed to include in the legislation provisions to extend a $100 billion credit line to the IMF and expand the US contribution to the multilateral lender by $8 billion. The legislation also endorses the IMFs plan to sell 400 tons (12.97 million ounces) of its gold reserves.