Convicted crash cop Joseph Gray was so confident he could pass a sobriety test immediately after he mowed down and killed four people that he demanded to take a Breathalyzer test – but no cop wanted to give him one, The Post has learned.

Instead, Gray’s fellow officers turned a deaf ear to his demand for the likely incriminating test – choosing to wait for a lawyer or police union representatives to arrive to counsel him on his next move, law-enforcement sources said.

Their curious actions appear to be the first bricks in a “blue wall of silence” that ultimately failed to protect the cop from conviction.

These new details are emerging in the investigation into whether Gray received “special treatment” after the terrible crash.

The investigation gained steam late last month when prosecutors learned – for the first time – that the highway cop in charge of testing Gray’s blood-alcohol level huddled with police union officials and discussed which type of sobriety test Gray might “beat.”

Before retired police Officer Martin Finkelstein’s bombshell disclosure, the office of Brooklyn DA Charles Hynes and NYPD brass already believed Gray was treated differently than any other DWI suspect in a fatal crash – he was not even handcuffed.

But law-enforcement sources say the NYPD’s velvet-glove treatment of Gray began just minutes after his van sent Maria Herrera, a Dominican immigrant, her son, Andy, and her younger sister, Dilcia Peña, flying to their death at around 9 p.m. Aug. 4.

When patrol cops and paramedics arrived at the scene, Gray was already out of his van, walking around and obviously aware that he would be questioned about his sobriety. He wanted to prove he was sober right away.

“I’m not drunk, I’m not drunk,” Gray insisted, according to a top source.

“I’ll take a test right now, right now,” he repeatedly said.

Most cops in trouble understand that it is prudent to wait for a lawyer or union representative to show up to provide counsel, insiders noted.

But the cops on the scene couldn’t tell that to Gray because it could have placed them in conflict.

Since those cops were not required to administer the test, that is a procedure conducted by accident investigators, they ignored him, sources said.

“Gray was insisting on taking it,” a high-level source said. “No officer would tell him not to. So they just walked away.”

Sources said the homicide case was quickly taken over by Highway Division investigators.

That allowed arriving Internal Affairs cops to turn their attention to probing scandalous signs that Gray and other cops had been drinking all day.

Internal Affairs probers went off to identify the other cops and determine if supervisors were aware of what turned out to be regular beer parties on NYPD property.

The question over Gray’s drunkenness was moot because prosecutors got a blood sample a few hours later that showed he was intoxicated.

But in the months that followed, prosecutors became increasingly disturbed over the way the Gray case was handled.

On the stand just hours later, his bombshell became public – and the coverup probe was formally announced.

Key testimony in the Joseph Gray trial:

Eyewitness Rosa Cintron says the victims – whom she saw from a few feet away – were in a crosswalk when Gray’s minivan ran a red light and plowed into them, throwing the women and dragging the boy 130 feet.

Neighbor Freddie Roman, who heard the horrific crash from his back yard and ran to the scene, testifies that when he confronted Gray about his drunken state, the cop retorted, “Come on, man, we all have a few beers once in a while.”

Physicist John Kwasnoski testifies Gray was going as fast as 55 mph in a 35-mph zone.

Dr. Parag Shah, an NYPD lab criminologist, testifies Gray’s blood-alcohol level was more than twice the amount required to be considered driving while intoxicated.

Gray testifies he had about a dozen beers – but insists he wasn’t drunk.