Amy Coney Barrett, President Trump’s nominee to join the Supreme Court, once represented an affiliate of an Iranian exile group as it challenged its State Department designation as a foreign terrorist organization.

Barrett disclosed her legal work for the group, which she undertook while employed at a law firm in Washington, in the Senate questionnaire she submitted during her 2017 confirmation process to join the U.S. Court of Appeals for the 7th Circuit. The work did not come up in her confirmation hearing.

Barrett wrote that she was one of five lawyers on a team that represented the National Council of Resistance of Iran and its U.S. representative office from 2000 to 2001 in their petition to review the State Department’s foreign-terrorist-organization designation.

The NCRI is affiliated with the Mujahideen-e Khalq (MEK), a onetime militant group comprising Iranian exiles who oppose Iran’s clerical regime. The Obama administration removed the group from the U.S. government’s list of terrorist organizations in 2012. The MEK has faced accusations of cultlike practices, which the organization has disputed as smears.

Barrett wrote that she “assisted with legal research and briefing” for the Iranian exile group’s case while she worked for Miller, Cassidy, Larroca & Lewin LLP, a law firm that merged with Baker Botts LLP in 2001 during her employment there. In her questionnaire, Barrett said the counsel of record on the case was Martin D. Minsker, signaling that she was a junior lawyer on the case.

Minsker didn’t immediately respond to a request for comment. A spokesman for Baker Botts declined to comment.

The MEK formed as a militant group in opposition to Iran’s monarchy but was forced into exile after the 1979 revolution that toppled the shah. The State Department designated the MEK as a foreign terrorist organization in 1997, citing its involvement in the killing of Americans in Iran during the 1970s. The department, which also cited a 1992 incident in which five men with knives invaded the Iranian mission to the United Nations in New York, said the NCRI “functioned as part of the MEK” and “supported the MEK’s acts of terrorism.”

Shahin Gobadi, a spokesman for the MEK, said the State Department designated the group as a foreign terrorist organization unfairly in 1997 for political reasons, to curry favor with Iran.

“What’s important is the designation, to begin with, wasn’t established and was politically motivated,” Gobadi said, citing statements by Clinton administration officials involved in the decision.

Barrett played a small role in the MEK’s years-long effort to remove its terrorist designation in the United States.

In the case she worked on before the U.S. Court of Appeals for the D.C. Circuit, the NCRI argued that because it maintained a U.S. affiliate office and bank account, and was seen as an alias of the MEK by the U.S. government, the exile group should have been afforded due process rights under the Fifth Amendment of the Constitution when the State Department deemed the organization a terrorist group.

The court agreed, ordering the State Department to provide due process by disclosing certain information it used to make the determination and affording the designee a right of rebuttal. The U.S. government maintained the terrorist-group designation until 2012, when a D.C. Circuit judge set a deadline for the State Department to grant or deny the group’s petition.

Days before the deadline, the department revoked the designation, citing the group’s public renunciation of violence and the absence of confirmed acts of terrorism for more than a decade. The decision came as the MEK agreed to leave a base in Iraq that Saddam Hussein had allowed its members to occupy for years. The U.S. military had been providing protection for the group at that base.

“With today’s actions, the Department does not overlook or forget the MEK’s past acts of terrorism, including its involvement in the killing of U.S. citizens in Iran in the 1970s and an attack on U.S. soil in 1992,” the State Department said upon delisting the group. “The Department also has serious concerns about the MEK as an organization, particularly with regard to allegations of abuse committed against its own members.”

Gobadi, the MEK spokesman, said the terrorist-group designation was “thrown out the window by the courts.” He called the department’s citation of abuse allegations “preposterous remarks” that “were made as a face-saving measure on the day.”

White House spokesman Judd Deere emphasized Barrett’s junior role in the case, noting that she was not the counsel of record and “assisted with legal research and briefing.”

Arthur Hellman, a professor emeritus at the University of Pittsburgh School of Law and an expert on the U.S. federal courts, said Barrett, as a junior associate at a law firm, probably would not have had permission to choose her clients — and in any case shouldn’t be judged by them. He said the Supreme Court could use judges with more experience in private practice.

“If we think it’s desirable, as I and a lot of others do, that you have justices on the Supreme Court who have gotten their hands dirty with real-world litigation — some of that is probably going to be on behalf of clients that are not terribly admirable,” Hellman said.

Barrett worked in private practice for two years after clerking for Supreme Court Associate Justice Antonin Scalia and before entering academia.

The MEK has long sought legitimacy in the United States, in part by paying former government officials from both major parties to speak at its annual rallies, and has presented itself as a secular, democratic alternative to Iran’s theocratic regime. The dissidents also revealed the existence of secret Iranian nuclear sites, aiding U.S. efforts to thwart Iran’s nuclear ambitions.

Former New York mayor and Trump ally Rudolph W. Giuliani and former Trump national security adviser John Bolton have both been outspoken proponents of the group, as have Democrats like former Pennsylvania governor Ed Rendell and former Vermont governor Howard Dean.

The group, however, has also been dogged by accusations of human rights abuses, after some former members described cultlike practices by the organization designed to control its members.

“I call them basically a cult,” said Ervand Abrahamian, a professor emeritus of Iranian and Middle Eastern history and politics at Baruch College in New York.

Gobadi, the MEK spokesman, disputed those accusations, describing them as part of a long-standing disinformation campaign against the group by the Iranian regime and its intelligence apparatus.

He said the allegations had been proved “time and again to be totally baseless.”

Julie Tate contributed to this report.