Updated

A Moroccan court Tuesday acquitted a British man for alleged links to deadly bombing attacks in Casablanca (search) last spring, but sentenced him to four months in jail for adultery, judicial officials said.

The appeals court in the city of Fez threw out charges against Anthony Perry Jensen for alleged ties to a militant Islamic network linked to five near-simultaneous suicide bombings in May that killed 32 bystanders, the officials said on condition of anonymity.

Jensen, 37, was sentenced on charges of "debauchery and offense at good values" related to adultery, the officials said. Jensen, who has wives in Morocco and Britain, has eight days to appeal.

Jensen was one of two British citizens detained in June for alleged links to the clandestine group Salafiya Jihadia (search), a militant Islamic network implicated in the May 16 attacks. Moroccan officials say the group has ties to the Al Qaeda (search) network of Usama bin Laden.

The other Briton, businessman Abdellatif Merroun, 42, will appear before a court in the Moroccan capital, Rabat, in the coming weeks, the officials told The Associated Press.

Jensen converted to Islam in the early 1990s and is married to a Moroccan woman, a Moroccan source said. He allegedly traveled to Afghanistan and other countries as a result of his ties with Islamic fighters.

However, Jensen already was married in Britain, where he has two children, the officials said.

The bombings shocked this North African kingdom, which prided itself on the peace that prevailed despite a deadly Islamic insurgency in neighboring Algeria. The attacks targeted a major downtown hotel and Jewish and Spanish sites.

Justice Minister Mohammed Bouzoubaa said last week that more than 1,000 suspected Islamic militants are facing legal proceedings for terrorism-related activities across the North African kingdom.

Moroccan authorities contend that the bombings, carried out by Moroccan citizens from poor slums around Casablanca, were guided by an international network.