A Pakistani court on Wednesday ordered the release from house arrest of an Islamist leader accused by the United States and India of masterminding attacks on Mumbai in 2008 in which 166 people were killed, a prosecutor said.

Hafiz Saeed was put under house arrest in January after years of living freely in Pakistan, one of the sore points in its fraying relationship with the United States. His freedom had also infuriated its arch-foe, India.

Saeed, who is expected to be freed on Thursday, thanked the court judges in a video message released by his Islamist charity. "Thanks to God, this is a victory of Pakistan's independence," he said.