By Mariano Castillo

The man known as the "American Taliban" won a legal fight that will allow him and fellow Muslim inmates to gather for daily prayers.

A federal judge ruled Friday that the warden at the federal prison in Terre Haute, Indiana, was violating John Walker Lindh's rights by not allowing the religious activities.

Lindh argued that before 2007 Muslim prisoners were allowed to pray together for at least three of Islam's five daily prayers. Since then, with the exception of the holy month of Ramadan, the Muslim prisoners are allowed to gather only once a week.

The unit Lindh is housed in has 55 cells, and the majority of the prisoners are Muslim, according to court documents.

By not allowing group prayer, while at the same time allowing other group activities such as board games, the warden was violating the Religious Freedom Restoration Act, Judge Jane Magnus-Stinson found.

The law was designed to protect freedom of religion in prison, where policies can place burdens on such rights.

The judge ordered an injunction "prohibiting the warden from enforcing the policy against daily congregate prayer for Muslims, including Mr. Lindh, for whom daily congregate prayer is a sincerely held religious belief," the court order states.

Already, prisoners are allowed to gather in the unit's multi-purpose room to listen or watch recording of Quran verses. Allowing them to pray is not significantly different from this and should be allowed, the judge ruled.

Lindh, who was born in California, converted to Islam as a teenager.

He traveled to Afghanistan in 2001 and attended a terror training camp where he was introduced to Osama bin Laden.

Lindh was captured by the Afghan Northern Alliance on November 25, 2001, and imprisoned in a compound in Mazar-e-Sharif, where he was questioned by CIA agent Johnny Michael Spann, who was killed in an uprising at the compound a short time later.

As part of a deal, Lindh pleaded guilty to supplying services to the Taliban and carrying an explosive during the commission of a felony. His family filed a petition for clemency to commute the 20-year sentence, a request that was denied by President George W. Bush in one of his final acts in office.

CNN's Chelsea J. Carter contributed to this report.