BROOKLYN - An NYPD officer was sentenced to two years of probation and will lose his job after he stomped on a man's head in 2014, a judge said Thursday.

Officer Joel Edouard, 36, was stripped of his gun and reassigned to desk duty following the July 23, 2014 arrest of 32-year-old Jahmiel Cuffee in Brooklyn.

Police say Edouard spotted Cuffee smoking marijuana on Malcolm X Boulevard in Bed-Stuy and approached him. After a struggle, Edouard attempted to arrest him.

Eventually other officers joined in and wrestled the man to the ground. But cellphone video shows Edouard stomping on Cuffee's head immediately after the takedown.

Edouard and his defense attorney argued that he is not normally so violent and merely lost his temper during the 30-second struggle.

The judge said that Edouard's no-jail sentence is contingent on his termination from the police department. Police officials tell News 12 that he will be fired.