U.S. lawmakers have approved an urgent funding measure to pay for military operations in Afghanistan and Iraq.

The measure provides $33 billion mostly for the U.S. military operations in Afghanistan -- including funding that President Barack Obama sought to pay for a surge of 30,000 more U.S. troops he is sending to Afghanistan. Some of those funds also will help cover expenses in Iraq.

Another $4 billion also is reserved for a related civilian surge of economic aid to Afghanistan and neighboring Pakistan.

Approved by the House of Representatives in a 308-114 vote on July 27, the $37 billion appropriation is in addition to about $130 billion Congress has already approved for Afghanistan and Iraq for this year.

Altogether, Congress has appropriated more than $1 trillion for the two wars since late 2001.

Although Obama's Democratic Party controls the Congress, it took Obama six months to get lawmakers to approve the funding he sought. From the White House, Obama urged lawmakers to pass the bill just before the vote.

"Now we have to see that strategy through and, as I told the leaders, I hope the House [of Representatives] will act...to join the Senate, which voted unanimously in favor of this funding, to ensure that our troops have the resources they need and that we're able to do what's necessary for our national security," Obama said.

Central Command Nominee

Meanwhile, the general nominated as the next head of U.S. Central Command testified before the Senate Armed Services Committee on July 27, saying he supports the strategy on Afghanistan laid out by Obama and General David Petraeus.

If confirmed as expected, General James Mattis would replace Petraeus at Central Command -- which oversees operations in 20 countries stretching from Egypt across the Middle East and into South and Central Asia.

Petraeus left Central Command in June to take over operations in Afghanistan after General Stanley McChrystal was fired because of a "Rolling Stone" magazine article that quoted him and his aides making unflattering remarks about U.S. Vice President Joe Biden and other U.S. officials.

Mattis, who led the U.S. Marines' 1st Expeditionary Force during the invasion of Iraq in 2003, told the Senate committee that victory in Afghanistan was possible. Mattis also said that, conditions permitting, U.S. troops would be able to start returning to the United States as soon as July 2011.

"I believe that by steadfastly executing our strategy we will win in Afghanistan," Mattis said. "Nothing about the mission will be easy, however. We recognize that achieving our goals in Afghanistan requires also the enduring commitment of the international community."

Mattis said he wanted the top leaders of two major insurgent groups in the region to be designated as terrorists -- the Quetta Shura and the Haqqani network. He said both groups "have engaged in terrorism."

The Quetta Shura, headed by Mullah Mohammad Omar, is the remains of the Afghan Taliban government that was overthrown and driven into Pakistan by the 2001 U.S. invasion of Afghanistan.

The Haqqani network, headed by Jalaluddin Haqqani and his son Sirajuddin, is based mainly in Pakistan's North Waziristan and nearby provinces in Afghanistan.

Supporters of the move say blacklisting the Quetta Shura and the Haqqani network could trigger punitive measures against them, such as the freezing of their assets. They say it also would increase pressure on Islamabad to go after militants within Pakistan's borders.

Pakistan, Iran

However, Mattis also stressed the importance of maintaining good relations with Pakistan in order to achieve success against Taliban militants.

Classified U.S. military documents leaked this week by the online whistle-blower WikiLeaks suggest that U.S. officials have long regarded Pakistan as an untrustworthy partner against militants.

Mattis called the leak "grossly irresponsible." He said he thought cooperation with Pakistan on counterterrorism was at an all-time high and that the U.S.-Pakistan relationship was "trending in the right direction."

"Inextricably linked to our campaign in Afghanistan is our strategic partnership with Pakistan. Proximity to an area with affiliated terror groups has dealt the people of Pakistan a tough hand geographically," Mattis said. "Pakistan continues to endure great sacrifices in their effort to counter extremism, and I am heartened by their efforts."

Mattis said he was most concerned about Iran and its efforts to enrich uranium -- a controversial program that Western countries fear is aimed at building nuclear weapons. Mattis said that program made Iran the biggest threat in the Middle East to regional and global stability.

"Iran offers the greatest long-term challenge in the region as it continues to threaten regional and global stability by pursuing a nuclear weapons program and by funding, arming, and training militant proxies throughout the region," Mattis said.

"The task of Central Command will be to counter the Iranian regime's destabilizing activities, to deter the regime from aggression, and to work in concert with our partners in the region to advance our shared security interests."

In recommending Mattis as the head of U.S. Central Command, Secretary of Defense Robert Gates said Mattis had the judgment and intellect required for the job.