(CNN) -- Diplomats and other observers in Libya say that with elections one month away, the National Transitional Council is struggling to exert control over various militia prominent in the uprising against Moammar Gadhafi.
The situation is further complicated by tribal rivalries and a growing presence of Islamist militants in some areas.
One source briefed by Western intelligence officials said that of particular concern is the city of Derna on the Mediterranean coast some 160 miles (260 kilometers) west of the Egyptian border.
The source told CNN that hundreds of Islamist militants are in and around the town, and there are camps where weapons and physical training are provided to militants. He said one official had described the area as "a disaster zone."
Tensions have grown between local people and the militants. Last month, a number of Derna residents went to a camp on the outskirts of the city, according to the source, and forced militants to leave.
There have also been a number of car bomb explosions in Derna in recent months, apparently as rival Islamist factions compete for supremacy in the area. One is said to have targeted Abdel Hakim al Hasadi, a former member of the Libyan Islamic Fighting Group who spent time in Afghanistan in the 1990s.
He told reporters last year he had been handed over to the Americans and sent back to Libya, where he was jailed for six years. The LIFG formally repudiated al Qaeda in 2009 and disbanded shortly afterward.
The source said that groups sympathetic to al Qaeda as well as former members of the Libyan Islamic Fighting Group had converged on Derna, and the presence of one man was especially worrying: senior al Qaeda operative Abdul Basit Azuz. He had been sent to the area last spring by al Qaeda leader Ayman al-Zawahiri and had some 300 men under his command, the source said.
Azuz was operating at least one training facility and has sent some of his men to establish contact with other militant Islamist groups as far west as Brega, the source said.
Al-Zawahiri's plan was for him to establish a "home base for al Qaeda" in Libya, the source said.
A senior counterterrorism official told CNN that Western intelligence is aware of Azuz's presence, his recruitment and training of fighters, and believes his redeployment to Libya had the backing of al-Zawahiri.
The official said it was unclear whether former LIFG militants were contesting Azuz's presence in Derna. It was possible, he said, that al Qaeda had grown strong enough in the area to deter such a confrontation.
However, one Libyan official familiar with the situation downplayed the threat of Islamist militancy in Derna. He acknowledged that there are Islamist militants in the city, but said he was "100% sure" that al Qaeda have not established a presence there. He said the militants amounted to a few dozen and that security in Derna was "better than in Tripoli."
The official said there are two military camps in Derna, and one was occupied by Islamists known as the al-Nour Brigade, but they are now "tied in" to the Libyan Interior Ministry. He denied there are any camps dedicated to training terrorists, adding that if groups like al Qaeda were operating in Libya, the country would have seen by now terrorist attacks targeting foreigners or foreign missions.
The threat to Western security posed by al Qaeda in eastern Libya was mainly "over-the-horizon" according to the Western counterterrorism official who spoke with CNN. But the official said it has the potential to become significant because of Libya's proximity to Europe.
Azuz has been close to al-Zawahiri since the 1980s and first traveled to Afghanistan in the early 1990s to join mujahedeen fighting the Soviet occupation, as did hundreds of Arab fighters.
Azuz later moved to the United Kingdom and lived in Manchester, where he increasingly cropped up on the radar screen of British counterterrorism services who suspected he was trying to radicalize youngsters, according to the source briefed by Western intelligence.
In the period after the July 7, 2005, London bombings, he was one of about a dozen Libyans held under so-called "control orders" and detained at Belmarsh high-security prison. After being released, he left Britain around 2009 for the Afghan-Pakistan border region, along with the son of another militant who was subsequently killed there.
Derna has long been associated with Islamic militancy. It was an area where the Libyan Islamic Fighting Group was strong during Gadhafi's rule. Many of the Libyan fighters who joined al Qaeda in Iraq came from the Derna area, according to documents seized by U.S. forces in Iraq in 2006. Many returned, while other recruits never reached Iraq, making the area potentially fertile ground for al Qaeda recruitment.
In 2008, a U.S. diplomat who visited Derna noted in a cable: "Unlike the rest of the country, sermons in eastern Libyan mosques are laced with phraseology urging worshippers to support jihad in Iraq and elsewhere through direct participation or financial contributions."
One source told CNN that the situation in the east was complicated by the presence of foreign fighters from Algeria, Morocco and the Sahel, including some from al Qaeda in the Islamic Maghreb.
Al Qaeda has tried to harness the unrest in north Africa to its advantage over the past year. One senior figure in the group, Abu Yahya al-Libi, said in a video message to fellow Libyans distributed on jihadist forums last year: "At this crossroads you have found yourselves, you either choose a secular regime that pleases the greedy crocodiles of the West and for them to use it as a means to fulfill their goals, or you take a strong position and establish the religion of Allah."
The Libyan official who spoke to CNN said there is no desire for extremism among the Libyan people. Diplomats in Tripoli agree with that assessment but say Islamist militants could take advantage of poor security, wide open spaces and porous borders.
The official said the Islamist trend in Libya -- represented by the Muslim Brotherhood and former fighters of the LIFG -- is strong but not united. He and other observers said it is notable that a prominent former figure in the LIFG, Abdel Hakim Belhadj, resigned this week as head of Tripoli's Military Council to run for public office. Diplomats say Belhadj is making the transition from jihadist to politician.
Many challenges confront Libya as it approaches June's elections, including that different militia remain influential players and have not been disarmed. Last week there was a gun battle in Tripoli close to the prime minister's office.
The special U.N. envoy to Libya, Ian Martin, has expressed concern over prisons run by militia that hold an estimated 4,000 detainees alleged to have been Gadhafi supporters.