WASHINGTON — A US federal judge Tuesday affirmed the government's right to hold at the Guantanamo Bay detention center Abdul Razak Ali, a 40-year-old Algerian suspected of ties to Al-Qaeda and the Taliban.

Judge Richard Leon, in a decision issued on the ninth anniversary of the opening of the controversial detention center at the US base in Cuba, said the government was justified in keeping Razak Ali for more than eight years.

In his 15-page opinion, Leon wrote that the government "proffered more than enough credible evidence" to conclude that Razak Ali was an associate of "a well known Al-Qaeda facilitator" named Abu Zubaydah.

Razak Ali was arrested by Pakistani forced in March 2002 along with Abu Zubaydah and his lieutenants in the city of Faisalabad.

US forces believed the group was trying to reconstitute a force to battle allied troops in Afghanistan.

The judge said the government had been holding Razak Ali because he was part of "an associated force" fighting US troops, dropping the phrase "enemy combatant" even though "there is no real discrepancy between these two standards."

The defendant claims he was mistaken for someone else and that his name is Saeed Bakhouche. He denies ever being in Afghanistan or fighting with Abu Zubaydah.

But Judge Leon said he relied on "obvious and common sense inference that a terrorist leader like Abu Zubaydah would not tolerate an unknown and untrusted stranger to dwell in a modest, two story guesthouse for two weeks with himself and ten or so of his senior leadership, while they are preparing for their next operation against US and allied Forces."

As a result, he said "the court cannot help but conclude that petitioner's presence at this guesthouse is enough, alone, to find that he was more likely than not a member of Abu Zubaydah's force."

Razak Ali is the 20th Guantanamo defendant to lose a court petition, according to the activist group Human Rights First, which said that 38 have been cleared of links to Al-Qaeda and related entities.

The US Supreme Court in June 2008 ruled that the Guantanamo prisoners could petition a federal court. Some have been released, while others remain behind bars, in some cases because no country is willing to take them, and in other instances because the decisions are being appealed by US authorities.

Guantanamo is now holding 173 prisoners, only three of whom have been convicted by a court.