A Muslim MTA construction worker who complained about a boss ordering him to shave his beard says he was given a hair-pulling work assignment as punishment — working with the public.

Longtime Metropolitan Transportation Authority worker Bernard Wilkerson of the Bronx said supervisors had always given him a pass on his facial hair, until 2018, when the construction flagger went for annual respirator training. Respirators are breathing apparatuses used on construction sites to prevent workers from breathing in harmful dust and debris.

When Wilkerson began receiving the training in 2013, he was given a full face mask to accommodate his whiskers instead of a mask that only covered his nose and mouth, according to his Manhattan Federal Court lawsuit.

But last year when he showed up for respirator training, Wilkerson, who started at the MTA in 2001 as a conductor before moving to construction work in 2004, was handed shaving cream and a razor and told to go shear his face in the bathroom, he charges in court papers.

When Wilkerson called supervisor Ricardo John to ask why he wasn’t allowed to use the full face mask, John allegedly told him, “I can’t tell you what religion to practice, but you can’t practice it here in construction flagging.”

After that call, Wilkerson claims he was transferred out of construction and “ordered to instead work on the platform performing customer service work with passengers.”

The change was “clear retaliation,” according to Wilkerson’s discrimination lawsuit, which seeks unspecified damages.

An MTA spokesman said the agency had not been served with Wilkerson’s lawsuit and wouldn’t comment on the litigation.