A 1-year-old boy from El Salvador clings to his mother after she turned herself in to Border Patrol agents Dec. 7, 2015, near Rio Grande City, Tex. (John Moore/Getty Images)

Three former federal immigration judges are publicly challenging a senior Justice Department official who argued that 3- and 4-year-olds can learn immigration law well enough to represent themselves in court.

“A typical three-year-old cannot tie her shoes, count to 100, peel a banana, or be trusted not to swallow marbles,’’ the former judges wrote in a brief filed late Monday in the U.S. Court of Appeals for the 9th Circuit. The court is hearing an appeal stemming from a federal court case in Seattle regarding whether immigrant children — thousands of whom are forced to defend themselves each year in immigration court — are entitled to taxpayer-funded attorneys.

It was in the Seattle case that Jack H. Weil, a longtime immigration judge who is responsible for training other judges, made his unconventional assertions about children. “I’ve taught immigration law literally to 3-year-olds and 4-year-olds,” Weil said in a deposition. “It takes a lot of time. It takes a lot of patience. They get it. It’s not the most efficient, but it can be done.” He repeated his claim twice during the deposition.

The three former judges, citing an article in The Washington Post reporting Weil’s comments, said in their brief that his position “has been justly ridiculed as preposterous.’’ They are Bruce J. Einhorn, a former 17-year federal immigration judge in Los Angeles; Eliza Klein, who was a longtime judge in three cities; and Lory D. Rosenberg, who was a member of the Justice Department’s Board of Immigration Appeals, which hears appeals of immigration cases.

All three worked for the Justice Department, and it is unusual for such former officials to publicly criticize those currently in government.

Weil’s deposition came in a case in which the American Civil Liberties Union and immigrant rights groups are seeking to require the government to provide appointed counsel for every indigent child who cannot afford a lawyer in immigration court proceedings. The Justice Department is contesting the lawsuit and is appealing to the 9th Circuit a federal judge’s decision allowing it to go forward.

Senate Minority Leader Harry M. Reid (Nev.) and other Democrats introduced a bill this month that would mandate government-appointed counsel for children in immigration court who had crossed the border alone or were victims of abuse, torture or other violence. The issue of children’s representing themselves has gained particular attention amid the recent surge of children from Central America crossing the Southwestern U.S. border.

Weil’s comments have made an impression on Capitol Hill. In a Senate Judiciary Committee hearing last week, Sen. Patrick J. Leahy (D-Vt.) told Attorney General Loretta E. Lynch: “I’ve been on this committee for decades, a lawyer for decades , I’ve never heard such a stupid, stupid, stupid thing from a judge or anybody else as that. You know, the immigration laws are complex enough anyway, but to say a 3-year-old child can represent themselves and learn this?”

Lynch responded that she shares Leahy’s “puzzlement over those statements.’’

“I’m not puzzled. Sheer anger,’’ Leahy said.

Lynch replied that Weil had made his comments “in a personal capacity” and that “in no way does the Department of Justice feel that children of that age, or even, frankly children even older, can or should represent themselves individually.’’

Yet it was the government itself that offered up Weil as an expert witness in the Seattle case. As an assistant chief immigration judge in the Justice Department office that sets and oversees policies for the nation’s 58 immigration courts, he is responsible for coordinating the Justice Department’s training of immigration judges.

Weil has not commented publicly on the controversy. In a brief email before The Post reported his comments March 5, he said his statements don’t “present an accurate assessment of my views on this topic” and were being “taken out of context.” He did not respond to subsequent emails.

Unlike in felony criminal cases in federal court, children charged with violating immigration laws have no right to appointed counsel, even though the government is represented by Department of Homeland Security lawyers.

Although a network of pro bono organizations and a Justice Department program try to help children find attorneys — some paid for by the government — many children are left to fend for themselves. According to Justice Department figures, 42 percent of the more than 20,000 unaccompanied minors involved in deportation proceedings completed between July 2014 and late December had no attorneys. It is unclear how often children age 5 or younger are left to defend themselves, but lawyers and advocates for immigrants said it does happen.

In their brief, the three former immigration judges said children should not have to stand alone in court against experienced government lawyers. “Children are simply incapable of representing themselves in immigration proceedings,’’ they wrote. “Absent effective representation for a child, it is impossible for anyone in an immigration court — including the Immigration Judge — to investigate and develop the child’s case to a degree that would permit the fair adjudication that due process requires.’’

Lauren Alder Reid, a spokeswoman for the department’s Executive Office for Immigration Review, said in response to the brief from the former judges: “In all cases, immigration judges are required to hold fundamentally fair hearings.’’

“It is an immigration judge’s duty to determine all possibilities a child may have for relief,’’ Reid said, adding that judges are trained not to move forward with deportation hearings if children and other defendants cannot be treated fairly.