A firefighter claims his dreams of being on an elite FDNY rescue squad were crushed when his co-workers began suspecting he is gay.

Jason Johnson, 40, a former National Guardsman, says in his Manhattan federal lawsuit filed Monday that he made it to a Special Operations Command unit in 2016, only to be kicked off the team several months later following a bizarre crotch-grabbing incident while riding a firetruck, which resulted in Johnson being branded as “gay.”

During the ride — and “while being watched by other firefighters” — firefighter Jason Ribisi, who is now retired, “grabbed Johnson’s penis” in an apparent effort to harass the newcomer, the lawsuit alleges.

Johnson responded by trying to kiss Ribisi in an effort to make him feel “equally uncomfortable,” the suit says, but the maneuver completely backfired.

“For the remainder of the ride, Ribisi and another firefighter made repeated disparaging remarks about Johnson’s perceived homosexual orientation, saying excitedly, ‘You’re gay, you’re gay, we have confirmation!’” according to the suit.

“You weren’t supposed to kiss him. You were supposed to punch him! No straight guy would have kissed him,” another firefighter allegedly said.

Johnson sued Ribisi for assault and battery. A person inside Ribisi’s Staten Island home did not answer the door when a Post reporter knocked for comment and his home phone went unanswered.

The teasing, taunting and harassment continued until Johnson was ultimately removed from the elite rescue unit in March 2017, he says in the suit.

Examples of the harassment alleged in the suit include:

Johnson was once photographed without his permission while changing. The picture was doctored to include a thought bubble above Johnson’s head reading “hey boys,” and shared with his squad.

After Johnson posted a video on Facebook of himself standing on a street “which happened to have a rainbow flag in the background,” he was subjected to discriminatory comments including, “Now we have official confirmation he is gay,” and “it’s your birthday and you’re a homo.”

When Johnson ate salads, his co-workers would say, “only gay guys would order salad.” He began isolating himself to avoid scrutiny, including eating in the bathroom, but that only prompted more teasing including from someone who asked him if he was “shame eating.”

When he arrived at work sweaty from jogging or biking to work, his Squad 18 firefighters would make snarky comments, such as “Did you run through west village to say hi to your gay friends?” or “Did it rain outside because you look like you were in a wet t-shirt competition?”

Johnson, who is black, is suing for racial and sexual discrimination, saying he was also exposed to “racially disparaging remarks” including once during a water rescue drill when a fellow firefighter said “black guys really don’t do well in water,” the lawsuit said.

His lawyer didn’t return a request for comment. A spokesman for the city’s Law Department said the city’s lawyers are reviewing the allegations.

The FDNY has been the target of numerous lawsuits over discrimination and bullying, and the city was forced to pay out over $100 million in 2014 to settle claims of bias in its hiring of black and Hispanic firefighters.

Additional reporting by Kenneth Garger