London: Despite a US government ban on contact with the Hamas, the US Central Intelligence Agency (CIA) tried to gain access to the Palestinian Islamist movement through back channels, spy cables accessed by the Al-Jazeera news channel and shared with British daily The Guardian reveal.

The cables suggest that US intelligence has been anxious to make inroads with Hamas, or recruit agents, inside the Gaza Strip, The Guardian reported Monday.

The US designated Hamas, which won the last Palestinian election in 2006 and now runs Gaza, as a terrorist group in 1997.

When US President Barack Obama became president in 2008, there was speculation that he might seek to establish contact, but that proved short-lived.

Despite an official ban on contact, a CIA officer discussed with a South African intelligence agent the possibility of gaining access to Hamas in 2012, the leaked documents disclose.

Since the end of apartheid, South Africa has had strong relations with both Fatah and Hamas, though the Palestinian Authority has voiced its disapproval at the Hamas links.

The US and South African agents met in East Jerusalem amid violent clashes between Hamas and Israeli forces.

According to a cable sent to Pretoria June 29, 2012, the CIA agent "seems to be desperate to make inroads into Hamas in Gaza and possibly would like SSA (the South African State Security Agency) to assist them in gaining access".

In a classic example of intelligence trading, the South African spy suggested that agreeing to the CIA's request would allow the SSA to understand US intelligence priorities.

"The CIA supports the overall US government effort to combat international terrorism by collecting, analysing and disseminating intelligence on foreign terrorist groups and individuals," a CIA spokesperson said.

"The CIA conducts those intelligence activities in compliance with the US constitution, federal statutes and presidential directives."