Ayub was arrested at the age of 26 in 1996 after allegedly telling a Muslim neighbor to read Salman Rushdie's The Satanic Verses. According to the allegation, he furthermore told the neighbor that "Christianity was correct and the only path". Although he denied the allegations, the court still signed off on an arrest warrant and the land he owned was given to the neighbor. Immediately following the arrest, all fourteen Christian families living in the village were also forced out.
The families and Ayub were part of a government program that gave housing plots to landless people. The locals resented them, because without the program the families worked the land in return for being allowed to live on it. Later in court, this was produced by the defense as the most likely reason for the false allegations.
During court proceedings, the neighbor (Akram) shot Ayub on the steps leading to the Session Court at Sahiwal. Despite multiple eyewitness testimonies of the shooting, police refused to prosecute Akram or even allow Ayub's family to file the legal paperwork of the shooting. Also during the proceedings, and while in prison awaiting his court hearings, four men assaulted Ayub, beating him mercilessly. The temperature in his jail cell frequently rose to 120F without any ventilation. Religious extremists protested outside the court, threatening to kill Ayub, his attorneys and the judge if there was no conviction.
On April 20, 1998, the Judge overseeing the case (Abdul Khan) sentenced Ayub to death and a fine of 100,000 rupees.
While incarcerated in Multan, he continued suffering attacks by other prisoners, was denied any medical care and was placed in solitary confinement (his cell measuring only 8x8x8). A higher court upheld the decision in 2001. Freedom Now began working on his case and on July 2nd, 2002, several members of the US Senate Appropriations Committee wrote to the President of Pakistan requesting his immediate release and due process of law. On August 15th, 2002, the Supreme Court of Pakistan acquitted him of blasphemy charges and ordered his immediate release.
Once released, threats continued against his life. The United States State Department and other groups including Freedom Now arranged political asylum in the United States. Ayub landed on September 4th, 2002 but had to leave behind a brother (who was beaten while Ayub was imprisoned) and elderly parents.