One of New York’s Bravest is breaking barriers — becoming the first transgender firefighter in city history.

The male-to-female firefighter has been openly welcomed by the FDNY, even as a Brooklyn judge handling a discrimination lawsuit against the department has blasted it for its lack of diversity.

The tall blonde, who now goes by Brooke, is a third-generation firefighter, with her father still on the job. The Post is withholding her full name.

Around Metrotech headquarters, where she is currently assigned, the famously macho department — almost 100 percent male with only 32 women on the job — is taking her transition in stride.

“It’s a tremendously courageous decision,” said one fellow firefighter. “Hopefully everyone will be supportive.”

The firefighter initially was assigned to Ladder 172/Engine 330 in Bensonhurst, according to department sources, before taking a desk job at FDNY headquarters where she works scheduling appointments for recruits.

She confirmed her transition to The Post last week.

“I am appreciative of the support that the FDNY has given me during this time in my life. However, it is my expressed wish that the details of my personal and professional life remain private,” she said in a written statement.

Her family has a long history of firefighting, starting at least three generations ago with Brooke’s grandfather, and continuing to her father, an FDNY officer who responded to the Twin Towers on 9/11.

The FDNY has been battling critics for many years who claim the numbers of black and female firefighters are way too low. White males make up about 91 percent of the approximately 11,000-member force.

The FDNY has an LGBT organization and some members are openly gay. But Brooke is the first known transgendered woman in the firefighting ranks.

In 2005 a city cop went public with his decision to become a woman.

Officer June Lo — formerly John Lo — said her Queens Transit Task Force had been “supportive and understanding.”

A longtime FDNY member said the majority of firefighters will do the same for Brooke, although some Bravest might have a hard time dealing with her gender change. Some insensitive colleagues have taken to calling her “it,” two department sources said.

“Especially among those who know the [family], this won’t amount to a hill of beans to them,” the veteran member said. “There’s a lot of respect for the family.”