President Obama on Tuesday cut back his itinerary here to deal with the rapidly changing events in Libya that have reshaped his first extended trip to Latin America as president.

Obama will skip a planned tour of El Salvador’s Mayan ruins Wednesday morning and instead will convene a conference call with his national security staff before departing for Washington, aides announced late Tuesday.

He visited the tomb of Archbishop Oscar Romero — a revered figure whose slaying in 1980 helped bring about a civil war — on Tuesday, a day earlier than scheduled, although administration officials emphasized he simply had free time in his schedule.

Even as Obama authorized U.S. ships and airplanes to enforce a no-fly zone in Libya, he had largely stuck to his schedule throughout a long-planned five-day trip to Brazil, Chile and El Salvador. But amid a complicated situation in Libya, including the crash late Monday of a U.S. fighter jet due to mechanical failure, Obama officials opted to slightly scale down his short visit to El Salvador.

First lady Michelle Obama and the couple’s two daughters will tour the Mayan ruins without the president on Wednesday, administration officials said.

Upon arriving here Tuesday from Chile, Obama met privately with Salvadoran President Mauricio Funes. He later attended a dinner at the presidential house and visited Romero’s tomb.

Even Funes noted the shortness of Obama’s visit, telling the U.S. president before reporters, “I hope that you enjoy the few hours that you are going to be here, the hospitality of our people.”

Unlike his three days in Brazil and Chile, Obama did not extol the progress of the country he was visiting. Instead, Funes and Obama said afterward, the two presidents spoke of how to combat Mexican drug cartels, which are increasingly using gangs in El Salvador and other Central American countries to warehouse illegal narcotics.

That drug trade has led to a surge in deadly violence throughout Central America, leading Funes and other leaders in the region to call for more U.S. aid to combat it. Obama told reporters after the meeting that the United States would invest $200 million in an initiative to discourage Central American youth from getting involved in gangs.

“I thought that President Funes gave a very eloquent response to one of my questions during our bilateral meeting. He said: ‘I don’t want a young man in El Salvador or a young woman in El Salvador to feel that the only two paths to moving up the income ladder is either to travel north or to join a criminal enterprise,’ ” Obama said.

Obama also embraced another major aim of the Salvadorans: an immigration bill that provides a path to citizenship for the estimated 2 million people from El Salvador who live in the United States. Obama reaffirmed his commitment to immigration reform, although he has done little in office to push it and many congressional Republicans oppose measures that they argue would reward illegal behavior.

“This is the time to do it, and I will continue to push hard to make it happen,” Obama said. “It won’t be easy. The politics of this are difficult. But I am confident that ultimately we are going to get it done.”

Obama aides considered the president going to both South and Central America a major priority. The administration does not want to be viewed as ignoring this region, even as Obama’s foreign policy agenda is dominated by matters far from here. At the same time, they have taken pains to illustrate Obama’s ability to meet with Latin American leaders and people but also to stay on top of every detail in Libya. For the last several days, the White House has released pictures of Obama at his hotel or on Air Force One that demonstrate his attention to Libya. And the administration has offered unusually detailed timelines of when Obama was informed of various news from Libya.

For example, officials said Tuesday that Obama first learned of the plane crash in Libya on Monday evening from national security adviser Thomas E. Donilon, who is with the president on the trip. Then, as Obama attended a dinner with Chilean officials, Donilon passed along updates to the president through another dinner guest, White House Chief of Staff William M. Daley.

Back at the hotel after the dinner, according to officials, Obama then held a post-midnight call with Adm. Mike Mullen, chairman of the Joint Chiefs of Staff.

“As we’ve said many times, being president involves the ability to be able to handle more than one very important thing at the same time,” said Joshua Earnest, a White House spokesman. “I do think this trip underscores that there are a lot of responsibilities both in terms of expanding opportunities in Latin America and making important foreign policy decisions when it comes to Libya.”

Correspondent William Booth contributed to this report