WASHINGTON — President Obama has asked the Pentagon for military options on Syria, the chairman of the Joint Chiefs of Staff, Gen. Martin E. Dempsey, told the Senate on Wednesday. But both General Dempsey and Defense Secretary Leon E. Panetta said the administration still believed that diplomatic and economic pressure was the best solution for protecting Syrians from the Assad regime.

In testimony before the Senate Armed Services committee, Mr. Panetta and General Dempsey fended off sharp questions from Senator John McCain, Republican of Arizona, about why the administration was not considering American airstrikes in Syria. On Monday Mr. McCain became the first senator to call for airstrikes, describing them as “the only realistic way” to stop what he called a slaughter. The United Nations has said more than 7,500 civilians have been killed in the year-long uprising against President Bashar al-Assad of Syria.But Mr. Panetta said intervention could expedite a civil war in the country and make an explosive situation worse. He said bluntly that the Obama administration recognized “that there are limitations of military force, especially with U.S. boots on the ground.”

Both Mr. Panetta and General Dempsey said repeatedly that Syria was far different from Libya, where an American-led air campaign established a no-fly zone before the fall of Col. Muammar el-Qaddafi last year. General Dempsey told the committee that although “we can do anything,” Syria had five times the air defenses that Libya did, and because of that establishing a no-fly zone would take “an extended period of time and a great number of aircraft.” He said the early stages of an air campaign would “almost unquestionably” be led by the United States, as was the case in Libya, because of American electronic warfare capabilities.

Senator Jack Reed, Democrat of Rhode Island, tried to draw General Dempsey out on what he saw as a potentially protracted operation. “So from a perceptual view alone, the opening stages in any military operation would be an extended, almost exclusive air campaign by the United States against Syria, presumably supported politically by the Arab League, NATO, the E.U. and everyone else. But the kinetic part of the operation would be ours for several weeks before we actually decided even going in and effectively protecting Syrians. Is that a fair judgment?”