The former head of the city firefighters union — who now runs the FDNY’s pension fund — was arrested Wednesday for allegedly crashing his government car in Manhattan while drunk and carrying cocaine, police sources said.

Steve Cassidy, the former longtime president of the Uniformed Firefighters Association, was traveling on Seventh Avenue in Midtown when he lost control of his Toyota Prius and mounted the sidewalk near West 30th Street about 11:55 p.m. Tuesday, sources said.

The 62-year-old Kips Bay resident crashed into a dumpster, which then struck a nearby storefront and damaged the building, according to sources. He narrowly missed hitting pedestrians.

Cassidy was carrying a yellow envelope containing cocaine in his wallet, according to sources.

Cassidy was charged with criminal possession of a controlled substance and DWI — a first offense, sources said. He was awaiting arraignment.

“[Cassidy] showed signs of intoxication, watery, bloodshot eyes, [and] slurred speech,” a source said.

No one was injured in the wreck.

Cassidy was taken to NYU Langone hospital, where blood tests were administered before he was hauled off to the Midtown South Precinct stationhouse just before 6 a.m., sources said.

Cassidy, wearing a collared shirt and a gray sport coat, said nothing to reporters as he was escorted out of the precinct in handcuffs and placed in the back of a squad car Wednesday afternoon.

After stepping down from his 14-year post as FDNY union boss in 2016, Cassidy accepted a newly created job as executive director of the city’s Fire Pension Fund.

He was appointed to the position by FDNY Commissioner Daniel Nigro.

“I am honored to have been selected by Commissioner Nigro to lead the establishment of an independent agency to operate the Fire Pension Fund and enhance the quality and level of service afforded to firefighters and fire officers as they approach retirement after providing years of selfless service to the citizens of New York City,” Cassidy said at the time.

“Having represented many thousands of firefighters who have retired in the last 14 years — to the more than 8,000 on the job today and the thousands more who will join the department in the years to come — this is an incredible opportunity to continue to serve them for the extraordinary work they do.”

Cassidy oversees the multibillion-dollar fund, which provides benefits for more than 17,000 retired firefighters.

He raked in total pay of $212,044 in 2017, according to data posted by SeeThroughNY.

The FDNY and the UFA did not immediately respond to a request for comment.

Additional reporting by Natalie Musumeci, Stephanie Pagones and Larry Celona