The first Guantanamo Bay detainee tried in civilian court is asking for leniency when he is sentenced for his role in the deadly al Qaeda bombings of two US embassies — because he was “mistreated” in custody and gave information to the CIA and the Defense Department.

Prosecutors yesterday revealed Ahmed Khalfan Ghailani’s request in court papers that also say the federal Probation Office has recommended life in prison for the Tanzanian terrorist, convicted last year in Manhattan of conspiring to destroy US property.