WASHINGTON " The U.S. military commander in Afghanistan, Gen. David Petraeus, says a significant and lengthy commitment is needed to stabilize the war-torn country. Speaking at a US Institute of Peace conference on Thursday, Petraeus warned that Afghan violence would increase dramatically without such an intensified commitment by the international community. A lack of additional efforts in Afghanistan by the United States and other countries could also lead to a resurgence in power by al-Qaida and the Taliban, the general said. But Petraeus did not offer a timetable for that potential increase in Afghan efforts. The general also said Iran and other countries, including the United States, had similar interests in Afghan stability. LIke the United States, Iran is concerned about the narcotics trade in Afghanistan and the resurgence of extremists there, he said. "It doesn't want to see Sunni extremists or certainly ultrafundamentalist extremists running Afghanistan any more than other folks do," he said, while acknowledging that the United States and Iran have "some pretty substantial points of conflict out there as well." President-elect Barack Obama said frequently during the campaign that he considered Afghanistan the central front in defeating terrorism. The Obama administration is expected to send 20,000 to 30,000 more American troops to Afghanistan over the next year. General Petraeus also cautioned that security in Afghanistan would not improve if the only initiative was the deployment of more American troops; he said that Afghanistan required a diplomatic and economic commitment as well. "There has been nothing easy about Afghanistan," General Petraeus said. Although "the natural tendency will be to look to the way progress was achieved in Iraq for possible answers," he added, it is clear that Afghanistan is different from Iraq. Afghanistan has a higher illiteracy rate, more difficult terrain and fewer developed resources than Iraq does, he said. The daylong conference, which was meant to highlight the foreign policy challenges facing the new administration, also included a warning from William Perry, a defense secretary in the Clinton administration, that Obama will "almost certainly" face a serious crisis with Iran during his first year in office. Perry, who is influential in Democratic national security circles and has ties to members of Mr. Obama's foreign policy team, said that Iran was "moving inextricably" toward developing nuclear weapons. "And it seems clear that Israel will not sit by idly while Iran takes the final steps toward becoming a nuclear power," he said.