Media captionHillary Clinton: "People must... be committed to a democracy that respects the rights of all"

US Secretary of State Hillary Clinton has made an unannounced visit to Libya aimed at showing support for the Libyan people and building ties.

Mrs Clinton was in the capital Tripoli for only a few hours - the first US cabinet-level official to visit since Col Muammar Gaddafi was ousted.

She said she hoped that Col Gaddafi would be captured or killed.

Her visit comes as fierce fighting erupted again in the former Libyan leader's hometown of Sirte.

The coastal city, east of Tripoli, is the last stronghold of his fighters.

Correspondents say men fighting for the Libyan National Transitional Council (NTC) came under attack on Tuesday morning.

AFP news agency reported that at least 35 injured NTC fighters were taken to a field hospital for treatment.

"They are shooting at us from everywhere, with snipers, mortars and RPGs [rocket-propelled grenades]. It is brutal inside. We are being shot from everywhere," one NTC fighter, Tahar Burzeza, told AFP at a clinic.

Gaddafi loyalists were able to recapture areas they had earlier lost and mortars were landing in the southern outskirts of the city which had been free of gunfire in recent days, Reuters news agency reports.

Malta talks

At the scene

By Kim GhattasBBC state department correspondent, in Tripoli

Hillary Clinton was greeted warmly on the tarmac of Tripoli's international airport, not by government ministers but by grateful anti-Gaddafi fighters chanting "God is great".

It's not everyday the US hears words of thanks in the Arab world.

The transitional Prime Minister Mahmoud Jibril also expressed his gratitude.

Libya is rich, with its own billions of oil dollars, so Mrs Clinton didn't pledge any money, but did offer American assistance and expertise to help rebuild the country - and she called on all fighters to unify under one leadership.

The US played a key, but low-profile, role in the Nato military campaign here so there was no victory lap for Mrs Clinton.

She did meet students, women and wounded fighters but she did not walk around the city or mingle with the crowds, for security reasons.

"I am proud to stand here on the soil of a free Tripoli and on behalf of the American people I congratulate Libya," she said.

She also visited a hospital and addressed students at the University of Tripoli, at a town hall-styled meeting.

"We hope he [Col Gaddafi] can be captured or killed soon so that you don't have to fear him any longer," Mrs Clinton said.

She said it was essential that the NTC unified the various militias that fought Col Gaddafi's forces.

"Putting a national army and a police force under civilian command is essential," Mrs Clinton said.

She said the NTC could continue to rely on US support as it tries to restore basic services and searches for thousands of missing anti-aircraft missiles.

Mrs Clinton's visit was kept secret because of safety concerns - heavy security measures were in place ahead of her arrival.

Her trip follows visits to Libya by the British and French leaders.

US officials say the visit is meant to show support for the NTC and the Libyan people, but also to start building a solid relationship with Libya.

Mrs Clinton flew in to Tripoli from Malta. There she met Maltese Prime Minister Lawrence Gonzi to discuss the situation in Libya and thank the Maltese authorities for their assistance during the crisis in the north African country.

The island has been a centre for humanitarian aid efforts and the evacuation of workers from Libya.

Mrs Clinton is the most senior US administration official to visit the island since President George Bush Sr and Secretary of State James Baker came in 1989 for a summit with then-Soviet President Mikhail Gorbachev.