A Minnesota police officer accused of fatally shooting Philando Castile in a St. Paul suburb last July pleaded not guilty to second-degree manslaughter and two other charges.

St. Anthony police Officer Jeronimo Yanez entered his plea in a brief hearing in Ramsey County district court.

Earlier this month, Judge William H. Leary III denied a defense request to drop all charges against Yanez. His attorneys argued that the officer feared for his life when he shot Castile. The trial date is set for May 30.

The controversial shooting case drew national attention. Castile, 32, was pulled over by Yanez and another officer on July 6 for a broken tail light. According to Castile's girlfriend, Diamond Reynolds, Yanez demanded to see Castile's license and registration. Castile reached for his wallet and told Yanez that he was armed. The officer opened fire.

In the immediate and emotional aftermath, Reynolds streamed the scene live on Facebook. Her 4-year-old daughter was sitting in the back seat of the car during the shooting.

Local officials later acknowledged that Castile had a permit to carry a weapon.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.