A federal judge Wednesday delivered a victory to the U.S. government in its effort to arrest terrorism suspects overseas for trial in civilian courts, ruling that prosecutors can use the statements of the accused ringleader of the 2012 attacks on an American compound in Libya.

Ahmed Abu Khattala has pleaded not guilty to 18 charges, including murder in the Sept. 11, 2012, attacks in Benghazi that killed U.S. Ambassador J. Christopher Stevens and three other Americans. Abu Khattala faces trial Sept. 25 in Washington.

Legal analysts called the 59-page opinion by U.S. District Judge Christopher R. Cooper of the District “a clear and convincing win” for the government that preserves authorities’ flexibility in interrogating and handling overseas terrorism suspects. Cooper denied a motion by Abu Khattala’s attorneys to suppress statements he made to FBI agents in custody after he was captured by U.S. Special Operations forces south of Benghazi in June 2014.

Abu Khattala had argued that his 13-day transatlantic trip aboard the USS New York violated his right to appear before a judge as quickly as possible. He also argued that the circumstances of his capture and interrogation were so coercive that his signed waivers of his right to an attorney and against self-incrimination were meaningless.

Cooper disagreed. “Abu Khatallah’s Miranda waivers were ‘made voluntarily, knowingly and intelligently,’ ” he wrote, adding that U.S. authorities undertook efforts to move him by sea after exhausting ways to transport him faster by air.

“Abu Khattala was treated respectfully and humanely while in custody; he was not subject to threats or promises of any kind; and his interview sessions were broken up frequently with time for meals, rest, and prayer,” Cooper said.

Cooper’s opinion marked one of the first and most detailed U.S. court rulings testing the constitutionality of ship-based detention and interrogation practices developed in recent years both to extract intelligence from terrorism suspects while preserving the option to try them in court.

Under those hybrid military and law enforcement policies, Abu Khattala was questioned in a two-step process. First, a High-Value Detainee Interrogation Group of military, intelligence and law enforcement officials not subject to constitutional safeguards interrogated him for three days. After that, a different “clean” team — an FBI unit isolated from the first group — questioned Abu Khattala for another six days to collect evidence for criminal prosecution after reading him his Miranda rights.

Lawyers for the Justice Department defended those efforts this year, even though Attorney General Jeff Sessions said numerous times while he was in the Senate that terrorism suspects should be sent to the naval prison in Guantanamo Bay, Cuba, rather than to civilian courtrooms.

The ruling is “another sign that prosecutions in [civilian] courts remain a very viable option for terrorism suspects, even those who are captured overseas” under extraordinary circumstances,” said Brian Egan, a senior White House and State Department ­legal adviser during the Obama administration.

A spokesman for U.S. Attorney Channing D. Phillips of the District, whose office is prosecuting Abu Khattala, declined to comment, citing the pending case.

Abu Khattala’s lawyers also declined to comment.

No defendant has been held under similar circumstances and questioned for longer than Abu Khattala before being presented to a U.S. court, his lawyers argued.

They asserted that U.S. officials deliberately designed a “slow-boat” strategy to create the appearance of preserving Abu Khattala’s rights while permitting nearly two weeks of unrecorded interrogation. They claimed that while the FBI told the suspect he had a right to a lawyer, when he asked whether one was present, he was told no, and the government did not attempt to fly one aboard or provide one by video conference.

However, Cooper said that Abu Khattala’s asking whether a lawyer was present was not the same as asking for a lawyer. He cited FBI claims that agents gave Abu Khattala his Miranda rights 15 times in writing or verbally, and that Abu Khattala sometimes chose not to answer some questions.