A diplomat from Sudan was arrested for allegedly grinding against a woman on a Manhattan subway Monday — but the charges were dropped because he has diplomatic immunity, police sources said.

The 49-year-old diplomat, Mohammad Abdalla Ali, was riding an uptown 4 train at about 2 p.m. when he allegedly approached the 38-year-old woman from behind as the train was leaving Grand Central and rubbed his crotch against her, police sources said.

He was taken to the Midtown South police station house, where he was charged with sexual abuse and forcible touching.

But once he provided identification papers proving he was a diplomat, he was released, according to the sources, who added that there will be no prosecution.

Sex crimes on the city’s subways have jumped 28 percent in 2016 compared with the same period in 2015.

The Sudanese Mission to the United Nations did not return calls or e-mail requests for comment.

The case of diplomatic malfeasance follows a disturbing incident from last October when a German diplomat allegedly punched his wife in the face at the couple’s Upper East Side home — and could not be prosecuted for the crime.

Joachim Haubrichs, 56, slugged 35-year-old Henna Johnson on Oct. 17 after he went into a rage because it was 7:30 p.m. and Johnson was still on her phone, which he strictly forbids, police sources said at the time.

Johnson called the police and told them she was beaten by her husband, the assistant attaché to Germany’s UN mission.

Despite Johnson’s black eye, cops said their hands were tied as soon as police brass passed along State Department confirmation that Haubrichs had immunity.