U.S. Attorney Ronald Machen makes a point during an interview with a reporter. Lack of experience in prosecuting high-profile terrorism cases could prove to be an issue for the District. (Andre Chung/for The Washington Post)

For years, the U.S. Attorney’s Office in Washington has watched as authorities in New York and Virginia handled many of nation’s biggest terrorism cases — even ones in which the District was the target of planned attacks.

Now, with the capture of Ahmed Abu Khattala, a suspected ringleader in the assault on U.S. outposts in Benghazi, Libya, in which four Americans were killed, U.S. Attorney Ronald C. Machen Jr. and his attorneys are poised to handle one of the most important American terrorism cases in recent memory. Abu Khattala, who is being interrogated aboard a U.S. warship, is expected to be brought to the United States and arraigned in Washington in the days ahead.

The case will mark a critical challenge for an office that has comparatively little experience in prosecuting high-profile terrorism cases, suffered setbacks in recent cases and, at other times, been considered slow to build cases. Several former law enforcement officials said top Justice Department figures have steered some cases away from Machen’s office, in favor of offices with more experience.

The Benghazi case “is an opportunity for the U.S. Attorney’s Office in D.C. to demonstrate its prowess in handling a high-profile, sensitive terrorism prosecution,” said David Laufman, a former assistant U.S. attorney who handled national security cases at the Justice Department.

Officials in the U.S. Attorney’s Office in Washington said in interviews that, over the past three years, Machen and his prosecutors have filed more cases against suspected terrorists than any of their counterparts nationwide — even if many of those cases remain sealed.

U.S. Special Operations forces have captured Ahmed Abu Khattala, an alleged ringleader of the 2012 attacks on the U.S. diplomatic compound in Benghazi, Libya. Here is what is known about Abu Khattala. (The Washington Post)

“When we have the facts, we go aggressively after the case,” said Gregg Maisel, chief of the national security section in Machen’s office.

Karen J. Greenberg, who directs Fordham Law School’s Center on National Security and who has tracked terrorism prosecutions, said the “train left the station a long time ago about which offices were going to be important in terrorism: Manhattan and Brooklyn and Northern Virginia.”

“This will be a major test of the federal prosecutors,” she said of the Abu Khattala case, “because they don’t have the institutional history and experience of the other courts.”

The Abu Khattala prosecution will be led by Assistant U.S. Attorney Michael C. DiLorenzo, who joined the national security unit in 2008. DiLorenzo, 45, won last year’s conviction of Julian Zapata Espinoza in the murder in Mexico of U.S. immigration agent Jaime Zapata but has less of a track record on terrorism.

Most federal prosecutions are pursued in close proximity to the sites of the alleged crimes, in one of the 93 U.S. attorney’s offices spread across the United States and its territories. But the D.C. office is unique: Under Justice Department guidelines, the U.S. Attorney’s Office in the District of Columbia has the legal authority to bring almost any case.

For the highest-profile cases, including terrorism cases, senior Justice Department officials frequently become involved in choosing the venue, considering factors such as the experience of the prosecutors, the reputation of the judges and the potential juries in each district.

“All cases can be brought in D.C., usually by the statutes or where the person first lands. So D.C. is in some ways a natural place to bring these cases,” Attorney General Eric H. Holder Jr. said in a recent interview with The Washington Post.

The list of terrorism prosecutions that have been made public and brought to conclusion in D.C. is relatively modest. Repeatedly, other offices have been assigned high-profile cases in which attacks were intended to take place in Washington.

When an Iranian American was arrested in a 2011 plot to kill the Saudi ambassador to the United States and attack the Saudi Embassy, many — including some in the FBI — thought it would be a natural fit for prosecutors in Washington. The plot involved targeting the ambassador at a site inside the District’s boundaries.

But the Justice Department sent the case to the Southern District of New York. The head of that office, U.S. Attorney Preet Bharara, orchestrated a complex operation along with the FBI to lure the suspect, Mansour J. Arbabsiar, out of Iran and then have his flight make an unexpected stop at New York’s John F. Kennedy International Airport.

Arbabsiar eventually pleaded guilty. A former senior federal law enforcement official familiar with the case said Justice officials “did everything they could” to keep the prosecution from falling to the Washington office for fear that it wouldn’t be handled properly. The official spoke on the condition of anonymity, as did others interviewed for this article, to freely discuss Machen and his office.

Similarly, a Moroccan named Amine Mohamed El-Khalifi pleaded guilty in 2012 to wanting to carry out a plot to bomb the U.S. Capitol as part of a terrorist operation. He was charged in the Eastern District of Virginia.

In another important national security case, the FBI arrested a group of Russian spies in June 2010. The case was assigned to prosecutors in New York instead of Washington, and the suspects were charged with conspiracy to act as agents of a foreign government without properly registering at the Justice Department in Washington.

Perhaps the most important public terrorism case, other than Benghazi, assigned to the D.C. office in recent years involved the December 2009 murder of seven CIA employees in Afghanistan.

In that case, Hakimullah Mehsud, commander of the Pakistani Taliban, appeared in a video admitting his role in the attack not long after it occurred. It took prosecutors, including DiLorenzo, approximately eight months to file a criminal complaint despite that concrete evidence.

“These are big issues that require a lot of deliberation. It’s not always cut and dried,” said Shawn Henry, a former assistant director in charge of the FBI’s Washington Field Office, which investigated the attack. Referring to Machen, Henry said: “Ron knows the issues. I have no criticism of him.”

The case against Mehsud never advanced in the courts. He was killed in a U.S. drone strike in 2013 in a lawless region of Pakistan.

In a long interview with The Post, Maisel — along with Machen’s special counsel, Matt Jones, and the office’s spokesman, Bill Miller — offered a robust defense of members of the D.C. office. They said the team has a strong record on national security, pointing to a string of espionage prosecutions.

One of the most high-profile of those cases involved revelations to the news media about a foiled 2012 terrorism plot in Yemen. Following an Associated Press report about the plot that was published after the attack was thwarted, prosecutors in the D.C. office secretly subpoenaed the phone records of AP editors and reporters, including Adam Goldman, who had co-written the AP article and now works for The Post.

Prosecutors successfully pursued Donald Sachtleben, a former FBI agent who pleaded guilty in 2013 to leaking classified information in the case. But the case set off an uproar for what critics described as an extraordinary intrusion by prosecutors into journalists’ communications. The Washington office faced similar criticism for labeling another reporter, James Rosen of Fox News Channel, a “co-conspirator” for seeking classified information from a source. That source, former State Department contractor Stephen Jin-Woo Kim, later pleaded guilty to sharing classified information.

At the same time, Machen has chosen to spend much of his time bringing public corruption to light, with convictions resulting in the resignation of three D.C. Council members and one of the city’s biggest contractors.

In three other offices, terrorism cases have become a mainstay of prosecutorial work. In Manhattan, Brooklyn and Virginia, prosecutors have won convictions against major al-Qaeda figures and others, putting those offices in the limelight — and at times rebuffing critics who argue that alleged terrorists shouldn’t be tried in federal courts.

Prosecutors in the Southern District of New York scored a significant victory after a 22-day trial of Sulaiman Abu Ghaith, the son-in-law of Osama bin Laden. A jury convicted him on terrorism charges in several hours.

Another case that wound up in New York was the 2000 murder of a U.S. diplomat in Niger, an attack in which a Marine also was wounded.

The case lingered for years in the U.S. Attorney’s Office in Washington, and prosecutors there did not bring charges. In 2012, the case was transferred to the FBI’s New York Field Office. Several months later, the U.S. Attorney’s Office in Brooklyn agreed to handle the investigation, leading to an indictment in September 2013.

In another troublesome case for the D.C. office, last year — amid a string of piracy convictions in Virginia and New York, primarily led by U.S. Attorneys Neil MacBride and Bharara — a D.C. jury acquitted a Somali suspect, Ali Mohamed Ali, on a piracy charge, and deadlocked on two lesser charges. Prosecutors then dropped the case against him.

Maisel defended his unit’s handling of that case and said senior officials at the Justice Department had approved the piracy charge.

“There were many facts that made this a tricky case,” Maisel said. “I don’t think there’s another office that wouldn’t have brought this case.”

With the Benghazi prosecution, officials said there will be much less room for error. The case will attract international attention and is at the heart of an intense partisan battle. Justice Department officials cannot afford a defeat, which would put the Obama administration further on the defensive about its handling of terrorism suspects.

Some assumed the Benghazi case would land in New York. The FBI’s New York Field Office has territorial responsibility for Africa, and the venue for those cases has traditionally been the New York-based courts. After the 1998 bombings of two U.S. embassies in Africa, prosecutors filed charges in federal court in Manhattan.

In the interview, Holder declined to offer specifics about why the case went to Washington. “We make determinations about where cases are to brought, based on a whole variety of factors, including the jurisdictional ones that exist in the statutes that we might be seeking to enforce,” he said.

In a separate statement sent by the Justice Department, Holder said: “I know that office as well as anyone, and the prosecutors there are as talented as any in the entire Department of Justice. Under Ron’s leadership, that office has been asked to handle some of the most complex and high-stakes cases of the last few years and has consistently made the Department proud.”

The assigning of the Benghazi case to D.C. led to some initial discomfort, several officials said. FBI agents investigating the Libya killings were not accustomed to working with their Washington counterparts, preferring prosecutors in Brooklyn and Manhattan who had more obvious terrorism experience, the officials said.

Although the Washington office has filed more than a dozen criminal complaints in the Benghazi case, the only unsealed charge is the one against Abu Khattala. That was filed in July 2013 — 10 months after the Benghazi attacks. One official with direct knowledge of the case said prosecutors could have charged him more quickly after assembling substantial evidence in the first several months after the killings.

In a one-page criminal complaint unsealed Tuesday, Abu Khattala was charged in connection with a deadly attack on a federal facility, supporting a terrorist group and a weapons offense.

Now that his case is moving forward, it will be a test for Machen and DiLorenzo, who primarily worked drug and gun cases before joining Maisel’s national security unit six years ago. Since then, DiLorenzo has helped prepare the cases against terrorists, including Mehsud, officials said. He was mentored by Amy Jeffress, Holder’s former national security adviser, who ran the national security section in the D.C. office before Maisel.

But DiLorenzo has never prosecuted a terrorism suspect.

Officials said he does have one advantage: a strong case.

A U.S. official who reviewed the evidence against Abu Khattala said it includes pictures and video from the time of the attack as well as testimony from first-hand witnesses and evidence of attack planners bragging of their involvement.

“It would be a really hard case to lose,” the official said.

Ann Marimow, Julie Tate and Sari Horwitz contributed to this report.