TRIPOLI, Libya — Secretary of State Condoleezza Rice said Friday that her historic visit to former pariah state Libya proves that the U.S. never writes off another nation forever.

Rice is the highest-ranking American official to visit the North African country in more than a half-century. She will meet over dinner with mercurial leader Moammar Gadhafi, whom President Reagan once called a "mad dog" and other U.S. leaders have called a terrorist.

"There is a long way to go but I do believe that this demonstrates that the United States doesn't have permanent enemies," Rice said as she flew to the capital. She said she had not expected she would ever go to Libya.

Rice was welcomed with a modest ceremony at the airport and was meeting with Libya's foreign minister before the highlight of the brief visit — dinner with Gadhafi. He invited her for the evening meal that breaks the day's fast observed during the holy month of Ramadan, and although details were sketchy ahead of time, U.S. officials said they expected Rice would dine in a traditional, desert-style tent.

"I look forward to hearing the leader's world view," Rice told reporters.

Gadhafi is expected to be surrounded by an all-female bodyguard corps.

Rice is the first secretary of state to visit Libya since John Foster Dulles in 1953 and the highest-ranking U.S. official to visit since then-Vice President Richard Nixon in 1957.

Gadhafi has sought the visit to culminate five years of halting but steadily improving ties that began when Libya abandoned weapons of mass destruction and renounced terrorism in 2003.

Libya has since agreed to pay compensation to the families of victims of the 1988 Pan Am 103 bombing over Lockerbie, Scotland, and those of a 1986 attack on a disco in Berlin, which prompted President Reagan to order retaliatory airstrikes on Libyan targets. The money is not yet all there, but U.S. officials say they are confident it will be paid soon.

"It demonstrates that when countries are prepared to make strategic changes in direction the United States is prepared to respond," Rice said. "It's a beginning, it's an opening. It's not, I think, the end of the story."

Rice was spending only a few hours in Tripoli, an ancient city fronting the Mediterranean sea and backing to the north African desert. There were few signs in the capital that Libyans or their government saw the day as particularly significant. Unlike in some capitals, there were no banners along her motorcade route or crowds lined up to gawk.

Rice was visiting the offices that serve as the U.S. embassy in Libya. Plans to send a full-fledged ambassador are hung up in Congress over concern that Libya has not fulfilled all its promises to compensate terror victims.

"No one can ever salve the wounds of the families," victimized by terror attacks, Rice said. "That is why we have looked so hard for justice to be brought and a means of compensation."

U.S. officials had hoped that Libya would have deposited hundreds of millions of dollars into the compensation fund by the time Rice arrived. But the State Department said Thursday that the account remained empty.

Some of the families of those killed in the Lockerbie bombing have raised vehement objections to Rice meeting with Gadhafi, whom they consider to be unrepentant for the deaths of the 280 people, including 180 Americans.

The Bush administration has expressed sympathy with the families but said it is time to move ahead with Libya, which is the first, and thus far only, country designated by the State Department to be a "state sponsor of terrorism" to be removed from that list through its own actions.

Rice's visit comes amid a surge in interest from U.S. companies, particularly in the energy sector, to do business in Libya, where European companies have had much greater access in recent years. Libya's proven oil reserves are the ninth largest in the world, close to 39 billion barrels, and vast areas remain unexplored for new deposits.

"Reliable sources of energy supply, multiple sources of energy, diversification of energy supply is an important element of economic development for the entire international economy," Rice said, but not the focus of the U.S. opening to Libya. "The relationship has much broader potential than just energy."

White House press secretary Dana Perino said Friday in Washington that the Bush administration hopes to be able to announce a new ambassador there soon.

"We have had a long and bad history with Libya," she said. "That began to turn around when they turned away from nuclear weapons and terrorism. That country has radically changed its behavior and Secretary Rice's trip signifies a new chapter in U.S.-Libya bilateral relations."

Relations between the countries are still strained on a number of fronts, ranging from human rights issues to the final resolution of legal claims from the terror bombings.

A leading Libyan reformer, Fathi al-Jhami, whose case has been championed by the Bush administration and by Democratic vice presidential candidate Joe Biden, remained in detention, where he has been near continuously since 2002. Rights groups say hundreds of other political prisoners are still being held.

Rice said she would raise the dissident's case with Libyan officials and wanted to see his release.

Libya, now an elected member of the U.N. Security Council, has voted with the U.S. on issues related to Iran's nuclear program and has helped with the Darfur crisis. But its support on other key issues, notably the Middle East peace process, is far from clear.

Among the biggest question marks is the often unpredictable behavior of the sunglasses-clad Gadhafi, who has cultivated images as both an Arab potentate and African monarch since taking power in a 1969 coup.

In an interview with Al-Jazeera television last year, Gadhafi spoke of Rice in most unusual terms, calling her "Leezza" and suggesting that she actually runs the Arab world with which he has had severe differences in the past.

"I support my darling black African woman," he said. "I admire and am very proud of the way she leans back and gives orders to the Arab leaders ... Leezza, Leezza, Leezza. ... I love her very much. I admire her, and I'm proud of her, because she's a black woman of African origin."