Barack Obama took on President Bush, Pakistan President Pervez Musharraf and his chief Democratic primary rival on Wednesday in a speech billed as major foreign policy statement by the Illinois senator.

Obama said he will be better focused than Bush on fighting terrorists in foreign lands — shifting away from Iraq and back to Afghanistan — as well as improving diplomatic relations and securing the homeland, according to excerpts from the speech prepared for delivery.

Obama, speaking at the Woodrow Wilson Center for International Scholars in Washington, D.C., also called for at least two more U.S. combat brigades to be sent to Afghanistan to fight Al Qaeda, and he had tough words for Musharraf, saying in the absence of more action from the Pakistani leader in the fight against terrorists, the U.S. would step in.

"The president would have us believe that every bomb in Baghdad is part of Al Qaeda's war against us, not an Iraqi civil war. He elevates Al Qaeda in Iraq — which didn't exist before our invasion — and overlooks the people who hit us on 9/11, who are training new recruits in Pakistan," Obama said, adding: "He confuses our mission."

Obama would place heavy conditions on the hundreds of millions of dollars in U.S. military aid to Pakistan: "Pakistan must make substantial progress in closing down the training camps, evicting foreign fighters, and preventing the Taliban from using Pakistan as a staging area for attacks in Afghanistan.

"I understand that President Musharraf has his own challenges. But let me make this clear. There are terrorists holed up in those mountains who murdered 3,000 Americans. They are plotting to strike again," Obama said.

"If we have actionable intelligence about high-value terrorist targets and President Musharraf won't act, we will."

While not naming any of his Democratic rivals, Obama's aides said speech is the strongest statement on terrorism in the Democratic field. Just last week, a spat between Sen. Hillary Rodham Clinton and Obama grew out of a debate question over foreign diplomacy.

Obama says he would be willing to meet leaders of rogue states like Cuba, North Korea and Iran without conditions. Clinton has lampooned the idea as naive. Obama responded by using the same words to describe Clinton's vote to authorize the Iraq war and called her "Bush-Cheney lite."

"The lesson of the Bush years is: Not talking doesn't work," he said Wednesday. He pointed to Syria's continued support for terror, North Korea's apparent march toward nuclear weapons capabilities

"It's time to turn the page on Washington's conventional wisdom that agreements must be reached before we meet, that talking talking to other countries is some kind of reward, and that presidents can only meet with people who will tell them what they want to hear," Obama said.

Obama also will said that as commander in chief he would remove troops from Iraq and put them "on the right battlefield in Afghanistan and Pakistan." He said he would increase non-military aid to the country by $1 billion.

He also said he would create a three-year, $5 billion program to share intelligence with allies worldwide to take out terrorist networks from Indonesia to Africa. Also on his itemized agenda is a plan to double foreign aid overall by 2012 and close Guantanamo Bay, where terrorist suspects are currently detained.

FOX News' Carl Cameron and The Associated Press contributed do this report.