Forces loyal to Libyan leader Moammar Gadhafi tried to deny rebels in Misrata their only lifeline to the outside world by shelling the port and the areas around it on Tuesday, rebels and residents said.
The shelling came as possible peace talks were developing.
Misrata, the biggest rebel stronghold in the west of Libya still resisting Gadhafi's forces, is encircled on three sides and depends on its Mediterranean port to bring in supplies.
Gadhafi's forces pulled out of the center of Misrata after weeks of shelling and gun battles failed to root out rebel fighters who harass government troops from the cover of bombed-out buildings.
But the withdrawal appears to have been only tactical, with pro-Gadhafi forces positioning themselves on the edge of the city and using heavy artillery to bombard the port and the area around it in the east of Misrata.
Rebel spokesman Abdelsalam said the insurgents appeared to have held off Gadhafi's forces in fierce fighting during which at least three people were killed and 10 wounded. A NATO air attack helped.
One resident, Mohammed Ibrahim, said the NATO planes had struck a convoy of scores of jeeps, destroying some and forcing others to retreat to the east.
Several containers were destroyed and some cars damaged in the bombardment of the port. The shelling stopped after nightfall, but it was unclear whether that was just temporary.
A rebel spokesman called Bashir said Gadhafi's forces were using Grad missiles — Russian-made munitions fired in multiple rounds from launchers on the back of trucks — to attack the port.
Libyan officials deny killing civilians in Misrata, saying they are fighting armed gangs and al-Qaida sympathizers who are seeking to destroy the country.
A doctor in the city, called Aimen, told Reuters that Gadhafi's forces were conducting "continuous shelling to the sea port" and that the bombardment was being done at long-range.
Misrata, Libya's third-biggest city, is about 130 miles east of the capital. Hundreds of civilians and fighters have been killed there since the city rebels against Gadhafi's rule in February, turning it into a symbol of resistance.
The NATO military alliance says it is doing what it can to protect civilians in the city but Gadhafi's forces have split up into small units and parked their armor next to buildings, making it hard for warplanes to find clear targets.
NATO planes bombed Khoms, about halfway between Tripoli and Misrata, on Tuesday, state news agency Jana said.
U.S. money for rebels
President Barack Obama has ordered the expenditure of up to $25 million in surplus government goods to support Libyan opposition groups and protect civilians threatened by Gadhafi's forces.
The president issued the directive Tuesday to Defense Secretary Robert Gates and Secretary of State Hillary Rodham Clinton. Obama informed Congress of his decision last week.
In a memorandum to Gates and Clinton, Obama authorized that the money be used for non-lethal commodities and services to help the opposition, led by the Transitional National Council in Benghazi.
The money may not be used to offer Libyan rebels broader assistance, including cash, weapons or ammunition. Included in the assistance are medical supplies, uniforms, boots, tents, personal protective gear, radios and Halal meals, which are meals prepared according to Islamic tradition.
Peace under discussion
A delegation of Libyan officials arrived in Venezuela to discuss possible peaceful solutions, Venezuela's President Hugo Chavez said on Tuesday.
Chavez, a close ally of Gadhafi, provided few details about the Libya delegation, saying only that "they have come to our country to search for a political way out of Libya's crisis."
Chavez told top Latin American diplomats that NATO airstrikes in Libya make no sense and are aimed at killing Gadhafi.
He denounced NATO airstrikes.

"They are launching bombs at the military barracks, schools, commercial centers," Chavez said in a televised speech. "Who gave them the right to do that? We are dedicated to seeking a peaceful solution to the drama the Libyan people are living with."
He particularly denounced Monday's bombardment of Gadhafi's compound, saying such attacks are aimed at killing Gadhafi: "How can that be supported?"
In Addis Ababa, Ethiopia, Libya's Foreign Minister Abdelati Obeidi accused the west of aiming "to punish Africa through Libya" and to "steal its wealth and colonize it again."
He told the Peace and Security Council of the 53-nation African Union the organization should invoke a mutual defense pact in response to western air strikes.
"My delegation proposes the holding as soon as possible of an extraordinary session of the Assembly of the Union," he said.
"This would "identify the ways that enable our continent to mobilize capabilities to face the external forces which aggress against us."
The AU, in which Gadhafi is one of the most influential members, wielding both financial and political clout, has been trying to broker a peaceful solution to the Libyan conflict.
Obeidi and rebels have been meeting separately with AU officials in Addis Ababa to discuss an end to the war.
The AU has proposed a solution that calls for an immediate cessation of hostilities followed by a transitional period and political dialogue.
The rebels rejected the plan earlier this month, saying any settlement must include the departure of Gadhafi and his sons.
Tension in Tripoli
In the Libyan capital of Tripoli gas shortages from international sanctions and the rebels' capture of eastern refineries are forcing people to line up for days at the pumps.
Residents say scuffles are breaking out at gas stations as lines of people — hundreds of cars long — block streets.
One resident said he queued all day on Monday only for the pump to run dry before his turn came.
"I've been here three days. I've been sleeping and waking in this line until it's my turn," said another resident, Mohammed al-Marini, who was a few cars away from reaching the pump.
"I tried other stations but they were empty. I thought this one was better organized," he added.
The government of Gadhafi cut the price of petrol from about 68 cents a gallon to 60 cents early in the crisis, but anger over shortages is rising among Libyans long accustomed to subsidies from the state, which produced 2 percent of the world's oil supply before the war.
Even before the conflict, Libya imported gasoline to supplement petrol produced at its own refineries.
With the major refinery at Tobruk in rebel hands, Gadhafi is relying largely on a refinery in Zawiya to supply the government-held west.
U.N. sanctions banning dealings with Libya's National Oil Company have also made it difficult for Gadhafi's government to import fuel.
Tankers turned back
Tankers carrying fuel are being turned back by NATO forces enforcing the sanctions, Libyan officials say.
Gadhafi's government has circumvented the sanctions by having petrol delivered to Tunisia, then transferred to Libyan vessels.
The trade exploits a loophole in the sanctions that permits purchases by Libyan companies not on a U.N. list of banned entities.
But the volumes getting through in this way have been relatively small.
"There are delays because of the maritime blockade and this negatively affects the lives of civilians," government spokesman Moussa Ibrahim told Reuters.
Reporting on the lines — and the growing anger they cause — is difficult because foreign journalists in Tripoli are not allowed out of their hotel unless accompanied by government officials. Reporters' requests to visit fuel stations have so far not been met.
Shops seem well-stocked, though the gas shortages may be preventing some fresh goods from reaching market.
Some people said they were unable to reach their offices as they have run out of gas.
Others complained that gas stations are being run by neighborhood gangs who give priority to neighbors or who stockpile gasoline in barrels and plastic containers to sell on at multiples of the official price.
"Each queue (line) is for a neighborhood and the people who live there get priority," said one taxi driver, who did not give his name. "If someone pushes in front of you, you cannot do anything because they will get their friends to beat you up."
One driver passing through the Libyan border last week said he filled up in Tunisia, though petrol was more expensive there.
"I filled up in Tunisia. It cost me 65 dinars. You know how much it costs to fill up in Libya? 9 dinars, but there are shortages. The queues are too long. What can I do?" said the driver, who gave his name as Ahmed. "Does this seem like an oil-exporting country to you? It is in need of reforms."
Before the crisis in Libya, petrol smuggling went in the other direction, residents on both sides say.
Tunisians would cross the border to buy much cheaper petrol in Libya and smugglers sold Libyan petrol in plastic containers by the side of rural Tunisian roads. But times have changed.
The taxi driver said he had worked at oil facilities at Ras Lanuf for years, but people originally from western Libya were expelled when the rebels arrived and took that city.
"People from the west used to work in the east because that is where the oil is, not in Tripoli... Even if they had not asked us to go, you worry for your safety," he said. "I am working the taxi now to pay the bills."