KARACHI, Pakistan (AP) _ The man whose marriage to the woman he loved landed them both in jail and sparked riots by their rival ethnic groups was shot and critically injured Wednesday when he arrived at court to face charges of having extramarital sex.

Police arrested the bride's father, brother and the man her family wanted her to wed for the shooting of Kanwar Ahson.

Doctors said Ahson was fighting for his life Wednesday night with gunshot wounds in the chest, abdomen and leg. One bullet severed his spinal cord; another was lodged near his heart.

Ahson, a member of the Mohajir community in his 20s, and Riffat Afridi, an 18-year-old Pathan, eloped last month against her family's wishes. The marriage sparked riots in Karachi that killed two people, and a council of Pathan elders sentenced Afridi to death, saying she had dishonored her family.

As night settled on Karachi, police stepped up patrols and security forces stood guard in armored personnel carriers, hoping to ward off possible ethnic violence sparked by Ahson's shooting.

Ethnic Pathans, who are from Pakistan's conservative Northwest Frontier province have often clashed with Mohajirs, Muslims who migrated from India after the subcontinent was partitioned by the British in 1947.

Several years ago, more than 1,000 people died in riots between Pathans and Mohajirs in Karachi after a Pathan bus driver hit and killed a young Mohajir girl.

Afridi turned herself in last week and remains in police custody. The couple has been charged with having sex outside marriage, a crime in this Muslim country, even though Ahson has produced their marriage certificate.

Women's rights activists say as many as 500 women are in jail throughout Pakistan under this law, which they claim is discriminatory.

Ahson was on his way to answer the charge when he was shot.

More than 250 Pathan men had gathered outside the courthouse to protest the marriage, and police said the gunmen were waiting for Ahson on an upper floor.

``We were walking up the stairs to the courtroom when the gunmen opened fire from a floor above,'' said Obaidullah, one of several policemen guarding Ahson.

For 10 minutes, bullets ricocheted off the courthouse walls. Police reinforcements fired back tear gas.

When the shooting stopped, eight people were arrested, including Jabbar Afridi, the father of the bride; Abbass Afridi, her brother; and Niazbat Khan, the man her family claimed she had previously married.

The couple has denied the earlier marriage, which the father announced only after his daughter turned herself in to police.

Police with helmets, bulletproof vests and automatic rifles stood guard outside Ahson's hospital room and around the hospital late Wednesday. A steel gate outside the hospital's emergency ward was padlocked to protect medical workers inside.