President Obama on Friday virtually ruled out the use of troops in Syria, saying he does not see a situation in which deploying ground forces would make sense for the United States or for the Syrian people.

Speaking at a news conference during a visit to Costa Rica, Obama said that “as a general matter, I don’t rule things out as commander in chief because circumstances change.”

But, he added, “I do not foresee a scenario in which boots on the ground in Syria — American boots on the ground in Syria — would not only be good for America but also would be good for Syria.”

Obama spoke as his administration is considering new options to ensure the end of President Bashar al-Assad’s rule in Syria, where a widening civil war has killed more than 70,000 people.

The administration has provided humanitarian assistance and other nonlethal aid to Syria’s rebel forces, a coalition of groups with varying ideologies and motivations. But Obama has declined to join such countries as Qatar and Saudi Arabia in sending weapons to the rebels for fear they may eventually be used by radical Islamist groups hostile to the United States and to Israel.

Interactive Grid: Keeping track of the conflict in Syria through videos, images and tweets.

The administration informed Congress last week that there is evidence that chemical weapons have been used in Syria, an escalation that Obama has called a “red line.”

Although Obama has asked for a U.N. investigation to determine which side used chemical weapons and to what extent, he also is considering providing lethal aid to the rebels for the first time.

Doing so would represent an incremental escalation in U.S. involvement in Syria’s conflict, although Obama has yet to make a final decision on whether to take that step.

After concluding the U.S. military role in Iraq and setting a deadline for the end of combat operations in Afghanistan, Obama is not looking for a new military commitment at a time of fiscal strain at home.

During the news conference, Obama was asked whether the deployment of American troops to Syria would be an option.

He didn’t answer at first but returned to the topic later, saying he did not want to send an unintended message by omission.

Senior administration officials have indicated that U.S. troops would not be a likely option should the administration decide to take on a larger role in Syria.

Nor are even the strongest American advocates for more direct support for Syria’s opposition arguing that U.S. troops should be sent into the heart of the Middle East.

“When I consult with leaders in the region who are very interested in seeing [Assad] leave . . . they agreed with that assessment,” Obama said.

Scott Wilson in Washington contributed to this report.