Secretary of State Condoleezza Rice made a surprise visit here Friday to bolster the first government formed since Syrian forces departed this spring. She warned Syria to stop interfering in Lebanese politics and demanded that it end a border tightening that threatens to hurt Lebanon's fragile economy.

"Good neighbors don't close their borders to their neighbors," Rice said at a news conference with the incoming Lebanese prime minister, Fuad Siniora. "It is a very serious situation on the Lebanon border where Lebanese trade is being strangled."

Shortly after Rice completed her seven-hour visit under tight security, an explosion rocked a busy street of restaurants and bars in a Christian neighborhood of Beirut, Lebanese television stations said. Twelve people were reported wounded.

Rice said she made the unexpected trip to support what she called "the new Lebanon," one that she said would be democratic and "free of foreign influence" and where "Lebanese should make decisions for the Lebanese."

She reiterated that the United States has no intention of dealing with representatives of Hezbollah, the pro-Syrian Shiite Muslim movement that won 14 seats in the parliament and has one in the cabinet. But she indicated that Washington would for now give the nascent government some room to deal with an organization that the United States shuns as a terrorist group.

U.N. Security Council Resolution 1559, passed last year, demanded the disarming of militia groups, among other steps. Rice said Hezbollah had a "history of blood" but "there is process of political reconciliation that is underway in Lebanon" that is important to support now.

Siniora, a Sunni Muslim, noted that while some elements of the U.N. resolution have been implemented, "we have to build within Lebanon the unity among the Lebanese."

Rice also raised with Lebanese officials the idea of scheduling an international conference to ease Lebanon's economic woes, including a $35 billion debt load, a senior State Department official traveling with Rice said.

Rice's decision to visit Lebanon was kept secret even from many of the aides traveling with her. Reporters accompanying Rice, who arrived Thursday in Israel after visiting Sudan, were woken at 6:30 a.m. for a briefing on the sudden visit.

U.S. officials had insisted Rice had no plans to visit Lebanon until after a new government was formed, which occurred Tuesday, just as she was leaving on a trip to Africa and Israel. Before her plane departed Washington, Rice approved the closely held decision to rearrange her schedule in Israel to permit Friday's excursion to Lebanon.

Rice's predecessor, Colin L. Powell, briefly stopped in Beirut for a couple of hours in May 2003, after visiting Damascus. The senior State Department official noted that, unlike Powell, Rice was not linking a visit to Lebanon with a related trip to Syria.

Her motorcade's tires squealing as it veered through traffic to avoid potential attacks, Rice crisscrossed this vast city of various religious and ethnic factions to meet with key leaders. In a bit of diplomatic choreography, she ignored the microphones set up by local media except when she met with Siniora, considered by U.S. officials to be a potential reformer.

She first met with the Saad Hariri, a member of parliament and son of the slain former prime minister Rafiq Hariri, whose car-bomb assassination in February led to a domestic and international outcry that forced Syria to withdraw its troops in April.

The massive five-story building in the Hariri family compound where the meeting took place was festooned with huge photos and banners dedicated to the slain father. Rice met with the son in a room as large as the White House East Room with windows 20 feet high; an adjacent dining room had seating for more than 100 people.

She also paid homage to Hariri at his grave site, near the waterfront between a huge blue-topped mosque and a Virgin megastore. Accompanied by Saad Hariri, she silently placed a white-flowered wreath on the grave and then visited the nearby graves of seven bodyguards who were also killed. "We love you, Condoleezza," a woman in the crowd shouted.

At another point, her motorcade crawled slowly past the site of the killing and the hulk of the St. George hotel, which was destroyed by the bomb attack.

Rice held an obligatory meeting with President Emile Lahoud, a Christian Maronite and Syrian ally whose term was extended by three years under pressure from Damascus.

U.S. officials have charged Syria with trying to undermine the Lebanese economy by blocking Lebanese exports so that agriculture products rot at the Lebanese-Syrian border. A Rice aide reported that Lahoud, in his meeting with Rice, said he was trying to resolve the problem but also laid out Syria's rationale for the border closure, including a claim that explosives were found on Lebanese trucks.

The aide said Rice responded that it was curious Syria could so effectively halt traffic on Lebanon's border but not Iraq's border. The Bush administration accuses Damascus of allowing insurgents to cross freely into Iraq.

Rice also held separate meetings with Nabih Berri, a Shiite who is speaker of the parliament, and opposition leader Michel Aoun, a retired general and staunch Syrian opponent who returned in May from exile in France. Followers of Aoun, who form the largest Christian bloc in parliament, were excluded from the cabinet.

Before visiting Beirut, Rice flew by helicopter Friday morning to the ranch of Israeli Prime Minister Ariel Sharon for talks on Israel's planned withdrawal next month from settlements in the Gaza Strip and northern West Bank. She plans to meet with Palestinian officials in Ramallah in the West Bank on Saturday before returning to Washington.

Secretary of State Condoleezza Rice met with Lebanon's incoming prime minister, Fuad Saniora, left, as well as other leaders.