A Library of Congress report from August 2012 noted that Ansar al Sharia Libya "has increasingly embodied al Qaeda's presence in Libya." The report also says that "it is probable that Ansar al-Sharia in Libya and in Tunisia are communicating."
Some of Ansar al Sharia Tunisia's most senior leaders have known al Qaeda ties, and at least two of them previously served as important al Qaeda operatives in Europe. The group's leadership openly praises al Qaeda and the organization's social media is littered with pro-al Qaeda messages. Ansar al Sharia Tunisia's Twitter account, before it was suspended, was known to re-tweet official messages disseminated by al Qaeda in the Islamic Maghreb's (AQIM) official media wing, Al Andalus Foundation. AQIM leaders have repeatedly praised and offered advice to Ansar al Sharia Tunisia.
The report also mentions that it is more than likely that al Qaeda in the Islamic Maghreb has made contact with Ansar al Sharia leaders. In addition, al Qaeda commander Mokhtar Belmokhtar has met with several leaders of Ansar al Sharia-allied militias in public. Belmokhtar reportedly met with Wisam Ben Hamid, who was at one time the leader of Katiba al Ahrar Libya (Free Libya Battalion), a group the report notes was likely part of "al Qaeda's clandestine network in Libya." That same network is headed by al Qaeda operatives who report to al Qaeda's senior leadership in Pakistan, including Ayman al Zawahiri. Wisam Ben Hamid is now a leader within Ansar al Sharia.
Sufian Ben Qumu, the leader of Ansar al Sharia forces in Derna, Libya, was a former Guantanamo Bay inmate.
A leaked Joint Task Force Guantanamo (JTF-GTMO) threat assessment describes Ben Qumu as an "associate" of Osama bin Laden. JTF-GTMO found that Ben Qumu worked as a driver for a company owned by bin Laden in the Sudan, fought alongside al Qaeda and the Taliban in Afghanistan, and maintained ties to several other well-known al Qaeda leaders. The US State Department added Ben Qumu to its list of Specially Designated Global Terrorists in January 2014 and said his branch of Ansar al Sharia as well as the Benghazi branch was involved in the attack on the US diplomatic compounds in Benghazi on Sept. 11, 2012.
Looking into the name 'Ansar al Sharia' in depth
Moreover, there are several credible accounts asserting that al Qaeda in the Islamic Maghreb and Ansar al Sharia in both Tunisia and Libya cooperate. The Tunisian Prime Minister said to Reuters, "There is a relation between leaders of Ansar al Sharia Tunisia, al Qaeda in the Islamic Maghreb and Ansar al Sharia in Libya. We are coordinating with our neighbors over that." Moreover, Ansar al Sharia Libya severely denounced the capturing of Abu Anas al Libi, a senior al Qaeda operative that assisted in the 1998 Embassy bombings in Kenya and Tanzania.
I have already mentioned Ansar al Sharia Tunisia, but there is also an Ansar al Sharia Egypt and one in Yemen. The one in Egypt, as noted here by The Long War Journal, "An Ansar al Sharia chapter in Egypt has hardly concealed its loyalty to al Qaeda. Its founder, an extremist who has long been tied to al Qaeda's senior leadership, has said that he is "honored to be an extension of al Qaeda."
The Ansar al Sharia in Yemen is recognized by the US government as an alias for al Qaeda in the Arabian Peninsula. It is extremely likely the moniker "Ansar al Sharia" is used by al Qaeda to (a) conceal activities in areas where they do not wish to be formally recognized and/or (b) as part of a rebranding to improve their public image. In early 2013, a letter was found in Mali written by al Qaeda in the Islamic Maghreb head Abdelmalek Droukdel, where he states that it's better to conceal their activities as part of a "domestic movement".
To again quote The Long War Journal, Droukdel goes on to say "As for foreign policies, you must adopt mature and moderate rhetoric that reassures and calms," he writes. "To do so, you must avoid any statements that are provocative to neighboring countries and avoid repeated threats. Better for you to be silent and pretend to be a 'domestic' movement that has its own causes and concerns. There is no call for you to show that we have an expansionary, jihadi, Qaeda or any other sort of project." Droukdel then says for part of al Qaeda in the Islamic Maghreb in Mali to fold into Ansar Dine to accomplish this.
This is very similar to Usama bin Laden instructing Mukhtar Abu al Zubayr, the late head of al Shabaab, to hide Shabaab's ties to al Qaeda. It is also worth noting that Jabhat al Nusra, al Qaeda in Syria, did something similar where they went official with their al Qaeda ties when al Baghdadi tried to assimilate them into al Qaeda in Iraq. Known ties to al Qaeda brings unwanted attention to their clandestine activities and could potentially bring military action against them.
It is therefore rational to believe that Ansar al Sharia Libya is following this basic archetype of concealing their al Qaeda ties. Furthermore, they have seemed to have learned from past mistakes by al Qaeda. For one, they haven't been too quick to enact Sharia. Secondly, they started as a Dawah group, which means that they started off as a peaceful group advocating the turn to Islam. They worked with local citizens and were quick to help with social services. They were also quick to work with other local groups to meet shared goals. This is very similar to what Jabhat al Nusra has done in Syria.
The last thing I want to point out is that several Western countries have motioned for the United Nations to add Ansar al Sharia Libya (and Tunisia) to their list of al Qaeda affiliated groups. While this should have been done long ago, it is nevertheless a welcoming motion. One reason for this motion was that several fighters from a group loyal to Mokhtar Belmokhtar trained in Ansar al Sharia bases in Libya for the In Amenas attack in Algeria.
While Mokhtar Bemokhtar and his al Mourabitoun (Those Who Sign in Blood) Brigades operate in Mali, Belmokhtar is also known to operate in Libya. Belmokhtar is thought to have been recruiting fighters returning to Libya from Syria. It is likely he has also helped train Ansar al Sharia fighters and based on the In Amenas attack, he has probably sent more fighters to Ansar al Sharia camps in Libya than what has been previously mentioned.
It is also important to note that in several Ansar al Sharia publications, the black flag first used by al Qaeda in Iraq is shown. While the Islamic State uses this flag (as they were, after all, al Qaeda in Iraq), other groups using this flag does not necessarily mean an affiliation with the Islamic State. For example, al Qaeda in the Arabian Peninsula uses this same flag, as does Boko Haram and al Shabaab. However, it was an al Qaeda branch that popularized this style that then found its way to other al Qaeda branches.