The NYPD intends to promote up to 40 sergeants who last year took a controversial examination for the rank of lieutenant, officials said Thursday.

Lawrence Byrne, deputy commissioner of legal affairs, said the promotions will involve sergeants who took the promotion exam when it was regularly scheduled in 2015.

An undetermined number of candidates who took a makeup exam later that year also may be promoted, Byrne said.

The original examination is the subject of a federal lawsuit by some sergeants who failed it and claimed a cheat sheet was posted on the Internet which gave those who took the makeup test unfair advantage. Those allegations have been referred to the city Department of Investigation, Byrne noted.

Byrne said that while the NYPD intends to promote some of the test takers, he explained the plaintiffs in the lawsuit have objected and will ask the court to stop the promotions. If the judge stops the promotions the department will delay the planned promotions. He said a different city agency, not the NYPD, actually administers the tests.

Byrne said the makeup exam is the same as the original exam but with the order of the questions changed.

The NYPD has questions about the validity of some of the reasons, as well as supporting paperwork, given by candidates who requested the makeup exam and is holding them back from consideration for promotion, according to Byrne.