WASHINGTON - In the days after the Sept. 11 attacks, alleged al-Qaeda operations mastermind Khalid Shaikh Mohammed intended to use his free Hotmail account to direct a U.S.-based operative to carry out an attack, according to a guilty-plea agreement filed by Ali al-Marri in federal court.

The document shows how al-Qaeda, at least in 2001, embraced prosaic technologies like prepaid calling cards, public phones, computer search engines, and simplistic codes to communicate, plan, and carry out its operations.

Marri also surfed the Internet to research cyanide gas, using software to cover his tracks, according to the document filed Thursday in federal court in Peoria, Ill. He marked locations of dams, waterways, and tunnels in the United States in an almanac. The government says this reflects intelligence that al-Qaeda planned to use cyanide gas to attack those sites.

Marri could be sentenced to up to 15 years in prison.

In a stipulation of facts filed as part of his plea agreement, he admitted he trained at al-Qaeda camps and stayed at terrorist safe houses in Pakistan between 1998 and 2001. There, he learned how to handle weapons and how to communicate by phone and e-mail using a code.

After arriving in the United States on Sept. 10, 2001 - a day before al-Qaeda's terror strikes in New York and on the Pentagon - Marri stored phone numbers of al-Qaeda associates in a personal electronic device.

He used a "10-code" to protect the phone numbers - subtracting the actual digits in the numbers from 10 to arrive at a coded number, said a person close to the investigation. In a 10-code, for example, eight becomes a two.

Marri sent e-mail messages to Mohammed's Hotmail account addressed to "Muk" and signed "Abdo." The details of that code were included in an address book found in an al-Qaeda safe house in Pakistan.

When Marri arrived in the United States, he created five new e-mail accounts to communicate with Mohammed, using the 10-code to send him his cell-phone number in Peoria. Marri, who entered the United States on a student visa, was arrested in December 2001. He was soon declared an enemy combatant and taken into military custody, and was held without charge for more than five years. The combatant designation was dropped when he was indicted by a federal grand jury in Illinois.