The official said Obama used the hour-long meeting to brief leaders from both parties on progress in targeting al-Qaida and working with the Pakistani government to dismantle terrorists' safe havens there.
Senate Majority Leader Harry Reid said that both Democrats and Republicans told the president, basically, that "whatever decision you make, we'll support it."
But Senate Republican leader Mitch McConnell put it differently: "I think Republicans will be able to make the decisions for themselves." He predicted that a significant number of Republicans would back Obama's next move if U.S. military commanders from the region are truly on board.
The White House said prior to the meeting that Obama considers it "tremendously important" to listen to Congress about the war but won't base his decisions on the mood on Capitol Hill or eroding public support for the war.
"The president is going to make a decision - popular or unpopular - based on what he thinks is in the best interests of the country," press secretary Robert Gibbs told reporters. As for support from lawmakers, Gibbs said Obama is focused on getting his war strategy right, not on "who's for or who's against what."
Obama's meeting with leaders of key war oversight and appropriations committees from both parties in the House and Senate was part of a review of the war effort in Afghanistan and Pakistan that is expected to last several more weeks.
A core question is whether Obama will widen the war again after adding 21,000 U.S. troops earlier this year. The top three U.S. military officials overseeing the war favor continuing the fight against an emboldened Taliban and have concluded they need tens of thousands more U.S. troops beyond the 68,000 already there.
The White House has cautioned for weeks that no decision on troops will come until Obama has reviewed all elements of the war effort.
What's clear is there will be no withdrawal of U.S. troops as the war hits a somber eight-year anniversary on Wednesday. Gibbs said Obama made that point personally clear in a meeting last week with his national security team, and the spokesman told reporters Monday: "I don't think we have the option to leave."
Obama's top defense and diplomacy advisers said the United States retains the Afghanistan war goal that he outlined just two months into his presidency - to sideline al-Qaida - but changing circumstances require a reassessment of how to get there.
Republican Sen. John McCain, Obama's opponent in last year's presidential election and one of the lawmakers expected at Tuesday's meeting, said he thinks it's critical that the administration avoid thinking of the insurgent Taliban and the al-Qaida terrorist network as separate issues.
"If the Taliban returns, they will work with al-Qaida," he said on NBC Tuesday morning. "It's just a historical fact. You can't separate the two. ... I strongly disagree with those who allege those are separate problems. They have worked together in the past and they will work together in the future."
Defense Secretary Robert Gates appealed Monday for calm amid the intense administration debate over the war, and for time and privacy for the president to come to a decision. Gates' remarks stood as an implicit rebuke of the man he helped install as the top commander in Afghanistan, Gen. Stanley McChrystal, for lobbying in public for additional troops Obama may decide to forgo.
"It is important that we take our time to do all we can to get this right," Gates said at an Army conference. "In this process, it is imperative that all of us taking part in these deliberations - civilians and military alike - provide our best advice to the president candidly but privately."
Gates has not said whether he supports McChrystal's recommendation to expand the number of U.S. forces by as much as nearly 60 percent. He is holding that request in his desk drawer while Obama sorts through competing recommendations and theories from some of his most trusted advisers.
The fierce Taliban attack that killed eight American soldiers over the weekend added to the pressure. The assault overwhelmed a remote U.S. outpost where American forces have been stretched thin in battling insurgents, underscoring the appeal from the top Afghanistan commander for as many as 40,000 additional forces - and at the same time reminding the nation of the costs of war.
Associated Press writer Ben Feller contributed to this report.