By Aziz El Yaakoubi
RABAT/TRIPOLI (Reuters) - Libyan Prime Minister Ali Zeidan, commenting on the U.S. capture of a wanted Libyan al Qaeda man in Tripoli, said on Tuesday that Libyan suspects should be tried at home, but that the raid would not hurt ties with Washington.
His remarks reflected Libya's struggle to balance relations with a major foreign ally while avoiding a backlash from Islamist militants who have taken over swathes of the country.
Militant groups angered by Saturday's raid have taken to social networking sites to call for revenge attacks on strategic targets including gas export pipelines, planes and ships, as well as for the kidnappings of Americans in the capital.
In the operation, U.S. special forces seized Nazih al-Ragye, known by his alias Abu Anas al-Liby - a Libyan who is a suspect in the 1998 bombings of U.S. embassies in Kenya and Tanzania that killed 224 civilians.
"Our relationship with the USA is important, and we care about that, but we care too about our citizens, which is our duty," Zeidan told reporters after a meeting with the Moroccan government in Rabat.
"They helped us with our revolution. Our relationship will not be affected by this event, which we will settle in the way that we need to."
The United States will move about 200 Marines to a U.S. base at Sigonella, Italy from one in Spain in the next day or so, U.S. military officials said, bolstering the U.S. ability to respond to any fallout from the raid in Libya.
The United States was among Western states which helped rebels overthrow long-time leader Muammar Gaddafi two years ago.
Chaos is still rife in the North African OPEC oil producer, enabling militants, some of them affiliated with al Qaeda, to use Libya as a base and to smuggle weapons beyond its borders.
Zeidan said Libyan citizens should be judged in Libya and that Tripoli was in contact with U.S. authorities to "take all necessary measures in this affair". Libya summoned the U.S. ambassador on Monday to discuss the issue.
U.S. officials say Liby is being held on a Navy ship in the Mediterranean Sea.
Among revenge calls posted on the Internet is one from Libyan jihadis on a Facebook page called "Benghazi is Protected by its People", which was monitored by the SITE service.
It told Libyans to seal off access to Tripoli and kidnap citizens of the United States and its allies in order to use them to bargain for the release of imprisoned militants.
It also urged them to damage pipelines exporting gas to Europe, and to attack ships and planes.
A year ago, Islamist militants were blamed for an attack on the U.S. consulate compound in the eastern Libyan city of Benghazi, during which the U.S. ambassador was killed.
A separate group called "the Revolutionaries of Benghazi - al-Bayda, Derna" accused Libya's leaders of having prior knowledge of the U.S. raid. Zeidan said at the weekend the government had asked the United States to explain the raid.
The group vowed to fight "everyone who betrayed his country and involved himself in this conspiracy. We say that this shameful act will cost the Libyan government a lot and it will be as you will see and not as you hear."
North Africa is home to Al Qaeda in the Islamic Maghreb and other Islamist affiliates which cooperate with the network or sympathise with its ideology.
Liby is wanted by the FBI, which gives his age as 49 and had offered a $5 million reward for help in capturing him.
He was indicted in 2000 along with 20 other al Qaeda suspects including the network's former leader Osama bin Laden, who was killed in a U.S. raid in 2011, and his successor, Ayman al-Zawahri.