With good reason to be embarrassed, an ex-NYPD cop who promised job security to a female recruit in exchange for sex, money — and her panties — donned a Halloween mask Wednesday to skulk out of Brooklyn Supreme Court.

Delfin Lantigua, 35, hid for more than an hour in a court hallway after sentencing on his plea deal was postponed until Tuesday. He said nothing as he breezed past photographers wearing a grey skull mask and his suit jacket over his head.

Lantigua, who was assigned to the Brooklyn North Task Force for nine and a half years before getting fired, contacted the 32-year-old recruit on Facebook, telling her he could expedite her hiring process if she slept with him, paid him $1,000 and gave him her underwear.

He obtained the woman’s information while working in applicant processing, sources previously said.

The dad-of-three was busted in March 2014 after thinking he was going to a Brooklyn motel to meet with the woman.

Cops also found three pairs of women’s underwear in his locker at work, sources added.

In April, Lantigua copped to felony bribery charges in exchange for five years probation. He’ll also be required to attend sex addiction counseling five to six times a month for six months.

“He admits to using poor judgment and expresses remorse for his actions which he blames on his sex addiction,” court papers say.

He had faced up to seven years in prison.