Democratic hopeful Barak Obama said this week that if elected president he wouldn't hesitate to attack al-Qaida in Pakistan to disrupt its safe havens and would quit Iraq in favor of boosting troop levels in Afghanistan. The Illinois senator criticized US President George W. Bush for making America "less safe than we were before 9/11" and described a world where US allies, including Israel, were confronted with increasing threats, adding that the Jewish state "is besieged by emboldened enemies." Obama has distinguished himself from the crowded Democratic field by having opposed the Iraq War before it began. But he used his speech on global terrorism Wednesday to stress that he didn't oppose the use of force when necessary or dispute Bush's characterization of the terror threat as a war, or disagree that providing freedom and hope was an essential antidote to the threat. "Just because the president misrepresents our enemies does not mean we do not have them. The terrorists are at war with us. The threat is from violent extremists who are a small minority of the world's 1.3 billion Muslims, but the threat is real," he said in prepared remarks. "I will not hesitate to use military force to take out terrorists who pose a direct threat to America." He also declared, to murmurs from his rival candidates, "If we have actionable intelligence about high-value terrorist targets and [Pakistani] President Musharraf won't act, we will." Obama's stance comes after last week's spat with his top rival for the Democratic nomination, New York Sen. Hillary Clinton, in which she accused him of being "irresponsible and naive" for saying that he would meet with leaders from nations such as Iran, North Korea and Syria without conditions upon entering office. Clinton, in contrast, said she would first try to learn their motives and what progress would be possible before agreeing to talk to them. Clinton's campaign used the contrasting answers to a CNN debate question to portray her competitor as inexperienced on foreign policy matters, while others have attacked him for being too dovish. Analysts said his speech Wednesday could serve to counter both perceptions and several media outlets referred to his remarks as "bold." But he received fresh criticism over his willingness to engage in military activity in Pakistan, as rival candidates and experts said US military action could destabilize Pakistan, breeding more militancy and undermining Musharraf. Obama also pushed Iran-sanctions legislation this week that he has co-sponsored. He welcomed House passage Tuesday of a parallel bill and has pressed to have his Senate bill fast-tracked. The Iran Sanctions Enabling Act, sponsored by Financial Services Committee chairman Rep. Barney Frank (D-Mass.) and Rep. Chris Shayes (R-Conn.), passed 408-6 and mandates the publication every six months of a list of companies invested in Teheran's energy and defense sectors, to facilitate divestment from the Islamic Republic by state pension funds. It also would protect fund managers who divest from Iran from lawsuits. A bill sponsored by Rep. Ileana Ros-Lehtinen (R-Fla.), the ranking member of the House's Foreign Affairs Committee, would extend existing sanctions on Iran's energy sector to financial institutions invested in the sector and make parent companies liable for sanctions. The bill, which passed on Tuesday by a vote of 415-11, is likely to be incorporated into broader sanctions legislation proposed by Rep. Tom Lantos (D-Calif.), the committee chairman. AP and JTA contributed to this report.