An Iraqi war veteran claims he’s being "punished" by a Long Island judge for calling the Veterans Affairs helpline about his messy child custody case — ultimately costing him time with his two kids.

James Gonedes’ lawyer David Mejias is now pushing to get Nassau County Supreme Court Justice Erica Prager booted from all custody cases, especially those "involving the parental rights of veterans to whom she has done a tremendous disservice," Mejias wrote Thursday in a letter to the county’s administrative judge.

BLACK VETERAN CELEBRATES THE US: ‘YOU’RE NOT BORN INTO A CASTE IN THIS COUNTRY, YOU'RE BORN INTO OPPORTUNITY'

The distraught 35-year-old US Marine, who has done three tours in Iraq, called the Veteran Affairs hotline late last month over concerns about a recent change to his custody agreement with his estranged wife Norma.

"This situation with the visitation with my kids really had me upset," Gonedes, now a nurse tending to COVID-19 patients in the intensive care unit at Stony Brook University Hospital, told The Post by phone. "I was worried I wasn’t going to see my kids."

In early June, Prager changed the arrangement from a rotating monthly schedule, which accomodated Gonedes fluctuating work hours, to two set weekends a month and at least one weekday.

Worried sick that the rigid visitation schedule would conflict with work, the dad of two called the VA to vent — as he’s done "every now and then."

"You’re told at the VA if you ever think you want to talk … use this helpline," Gonedes explained. "I did what I was told … I really just feel I was punished for it."

ARMY VETERAN, GOP SENATE CANDIDATE, ACCUSES TWITTER OF FLAGGING JULY 4 POST OF HIS SALUTE IN UNIFORM

Norma, who is listed as his next of kin with the VA, found out about his call for help — when the federal agency called her while doing a wellness check on him.

Her lawyer then flagged Gonedes’ "mental health status" and "psychological stress" to Prager, who stripped him of his overnight visits with his kids, ages 5 and 7, pending a hearing Friday.

Gonedes claims the judge’s decision also "emboldened" his wife to stop him from seeing his daughter on her 6th birthday on July 1.

ARMY VETERAN WESLEY HUNT: ‘DEFUNDING’ MILITARY WILL BE NEXT PUSH BY WOKE LEFT

In his letter to the county’s administrative judge, Mejias, Gonedes’ lawyer, said Prager should be removed from custody cases over her "complete lack of knowledge and insight into matters involving families and children."

Mejias claims that Prager’s June 25 decision was made without conducting a hearing first and without either side even asking for her to take away Gonedes’ overnight visits with his kids.

Gonedes, meanwhile, said he’s afraid to ever call the helpline again — and he’s warned his other veteran friends about his situation.

"I feel like [the helpline was] taken away from me. It’s a shame," he said. "Talking things through really helped me out. I will never call this helpline ever again."

Despite their September custody agreement, Gonedes and Norma have been duking it out in court since October, with Gonedes accusing her of not honoring the deal, and she asking Prager to change it — sparking the judge’s June 8 decision to set the firmer visitation schedule.

Mejias is appealing that ruling.

"What the judge did was make a contentious matter that had been resolved by the parties and created a dysfunctional situation that is resulting in a lot of litigation that neither party can afford," Mejias told The Post. "This is an egregious case where a judge abridged my clients’ rights to impose her own view on the visitation they should have."

CLICK HERE FOR THE FOX NEWS APP

He added, "This is such an affront to a guy who is an American hero."

Norma’s lawyer, Nelson De La Cruz, said in a statement: "Out of respect for the Gonedes children, the court, the sanctity of matrimonial proceedings, and the privacy of the parties, neither I, nor Ms. Gonedes have any comment relating to any allegations communicated to you.

"Ms. Gonedes remains deeply committed to the bests interests of the parties’ children."

Lucian Chalfen, a spokesman for New York State Court system, said: "It’s a pending matrimonial case with an appeal filed in addition — those are the venues to litigate this case."

Prager did not return a request for comment.

This story first appeared in the New York Post