Cops arrested a man who wielded three knives on an R train in Brooklyn Friday morning, authorities said.

Ivan Nieves, 53, of The Bronx, was on the train when it came to a halt at the Court Street subway station at 10:10 a.m., cops said. Someone notified cops, who boarded Nieves’ car and cleared all of the passengers out before ordering him to drop his knives, police said.

At one point, Nieves stood up and faced an officer, still holding all three knives, cops said.

After cops repeated the order multiple times, Nieves complied and dropped the weapons, according to authorities.

He was charged with menacing and weapons possession.