NEW YORK - A U.S.-trained Pakistani scientist convicted of trying to kill U.S. agents and military officers in Afghanistan was sentenced Thursday to 86 years in prison after she delivered a message of world peace and forgave the judge.

"I am a Muslim, but I love Americans, too," Aafia Siddiqui said during one of several rambling statements delivered at the behest of U.S. District Judge Richard M. Berman. "Forgive everybody in my case, please."

During her hearing in federal court in Manhattan, Siddiqui contended that she had evidence Israel was behind the Sept. 11 terror attacks and warned that more plots were in the works. "I do not want any bloodshed. . . . I really want to make peace and end the wars," she said.

Siddiqui, 38, rolled her eyes and shook her head as her lawyers tried to convince the judge that she deserved leniency because she was mentally ill.

News of the harsh sentence touched off protests in Pakistan. In Peshawar, dozens of people took to the streets shouting, "Down with America!" Some hit a portrait of President Obama with their shoes.

The Pakistani government, which helped bankroll Siddiqui's defense, was "disappointed at the sentence and sad that our efforts to get her back to Pakistan did not succeed," spokesman Abdul Basit said. "We are in touch with the U.S. administration to see what possible options are available."

The sentence imposed on the mother of three capped a strange legal odyssey that began two summers ago, when Siddiqui turned up in Afghanistan carrying notes referencing a "mass casualty attack" on New York City landmarks and a stash of sodium cyanide.

At trial, witnesses described how, after she was detained by Afghan police, Siddiqui grabbed a rifle and tried to shoot U.S. authorities who had gone to interrogate her. They said she yelled, "Death to Americans!" before she was injured in return fire and subdued.

Prosecutors argued for a life sentence, saying her crimes were premeditated and intended to harm Americans. The defense had asked for a sentence closer to 12 years.

Calling Siddiqui an "enigma," Judge Berman noted that she was educated at the Massachusetts Institute of Technology and Brandeis University in the early 1990s. She returned to Pakistan in 2003 and married a purported al-Qaeda operative, a nephew to Khalid Sheikh Mohammed, the admitted mastermind of the Sept. 11 attacks. Both men are held at Guantanamo Bay.