Interviews with several administration officials suggest that the tensions in his Middle East policy are less the product of a debate among advisers than of a tug of war within the president himself.

In Egypt, for example, Mr. Obama’s advisers say he decided to push for President Hosni Mubarak’s exit early on, against the advice of aides, after watching Mr. Mubarak’s defiant televised address on a screen in the White House Situation Room. Even then, they said, he feared that the dreams of young activists, like the Google executive Wael Ghonim, would be let down by the fitful transition to democracy.

One of his aides said that when he asked Mr. Obama to predict the outcome, the president said: “What I want is for the kids on the street to win and for the Google guy to become president. What I think is that this is going to be long and hard.”

That has proved even more true in Libya, where Mr. Obama reluctantly threw his support behind a NATO-led bombing campaign that has bogged down. Libya has become a major preoccupation for him, necessitating daily meetings, in which officials said he was being briefed on the targets for airstrikes and on diplomatic efforts to pry Col. Muammar el-Qaddafi from power.

Thomas E. Donilon, the national security adviser, said Mr. Obama was as deeply immersed in all the Arab countries undergoing political upheaval. “The president, in each of these cases, has really been the central intellectual force in these decisions, in many cases, designing the approaches,” he said.

At night in the family residence, an adviser said, Mr. Obama often surfs the blogs of experts on Arab affairs or regional news sites to get a local flavor for events. He has sounded out prominent journalists like Fareed Zakaria of Time magazine and CNN and Thomas L. Friedman, a columnist at The New York Times, regarding their visits to the region. “He is searching for a way to pull back and weave a larger picture,” Mr. Zakaria said.

Mr. Obama has ordered staff members to study transitions in 50 to 60 countries to find precedents for those under way in Tunisia and Egypt. They have found that Egypt is analogous to South Korea, the Philippines and Chile, while a revolution in Syria might end up looking like Romania’s.