CHICAGO — A Chicago police officer posted $1.5 million bail Monday, hours after a judge set the amount after viewing police dash-cam video of the fatal shooting of a black teenager.

Jason Van Dyke, 37, had to post $150,000 – 10 percent of the bond amount – to be released from Cook County Jail.

Van Dyke had been in custody since Nov. 24, when he was charged with first-degree murder.

Prosecutors had sought to hold the veteran officer on no bail, while Van Dyke’s attorney, Daniel Herbert, said he was not a risk to flee if released.

The Police Department suspended Van Dyke without pay last week after the first-degree murder charge was filed. Van Dyke had been placed on paid desk duty after the shooting last year.

At bond court last week, prosecutors said Van Dyke opened fire six seconds after exiting his squad car as 17-year-old Laquan McDonald was holding a knife and walking in the middle of the street shortly before 10 p.m. on Oct. 20, 2014.

Van Dyke fired 16 rounds at McDonald in about 14 seconds and was reloading when another officer told him to hold his fire, prosecutors said at bond court.

The criminal complaint charged Van Dyke with shooting McDonald “without legal justification and with the intent to kill or do great bodily harm.”

At a news conference last Tuesday, State’s Attorney Anita Alvarez said she has never seen anything like the shooting in her three decades in law enforcement.

She called the video “graphic,” “violent” and “chilling” and said it “no doubt will tear at the hearts of all Chicagoans.”

“To watch a 17-year-old young man die in such a violent manner is deeply disturbing,” the prosecutor said.

Alvarez said several civilians witnessed the shooting.

One motorist told authorities he never saw McDonald lunge at any officers or do anything else threatening before he was shot. McDonald also made no threatening motions while on the ground afterward, she said the motorist told authorities.

“The officer’s actions were not justified and were not a proper use of deadly force,” Alvarez told reporters.