An FDNY firefighter in this iconic 9/11 photo is suing the department and its black fraternal group for racial discrimination, claiming he was barred from an honorary post because he’s white.

Lt. Daniel McWilliams says the former head of the Vulcan Society told him he couldn’t be a flag bearer at its 2017 memorial service for deceased members because she “specifically requested an all-black color guard.”

He says he asked ex-society president Regina Wilson: “Are you removing me from the Color Guard because I am not black?”

She replied, “Yes, I am,” claims McWilliams in a lawsuit filed Friday in Brooklyn federal court.

Instead, he says, she ordered him to “go outside” and perform “lesser duties,” including gathering memorial attendees for the service.

The snub was part of a “consistent practice of … retaliatory racism, particularly towards white members of the FDNY Ceremonial Unit,” he alleges.

He also cites an incident in February 2017 when Wilson prohibited him and seven other white members of the unit from posing in a photo with the family of a firefighter for whom a library was being dedicated, his suit charges.

McWilliams was one of three FDNY firefighters who hoisted an American flag at Ground Zero on the day of the attacks.

An image of them snapped by photographer Thomas Franklin has become a symbol of hope and patriotism.

In a letter included in the complaint, the FDNY’s Equal Employment Opportunity Office corroborated McWilliams’ claims in a probe, saying “there was sufficient, credible … evidence to find that [McWilliams] was excluded from the Ceremonial Unit color guard on account of his race.”

The FDNY Bureau of Legal Affairs downplayed the incident as a “subtle exclusion” of McWilliams, according to the suit.

“I wonder how many lawyers it took in the FDNY Legal Department to come up with that clever term. I’m embarrassed for them,” said McWilliams’ lawyer, Keith Sullivan.

The FDNY took no action except to tell Wilson “she shouldn’t do that,” Sullivan said.

He added, “If roles were reversed, my white, male client would be removed from the unit and probably be on the unemployment line today.”

Wilson, reached on Saturday, refused to respond to the lawsuit.

“I don’t talk to The Post,” she said before hanging up.

FDNY spokesman Jim Long did not respond to requests for comment.