A person has been shot outside a swanky midtown Manhattan restaurant where rapper Tekashi 6ix9ine was celebrating Friday night, law enforcement sources tell NBC 4.

Sources say the Brooklyn rapper was at Chinese restaurant Philippe -- on 60th Street between Madison and Park -- celebrating after getting probation in a child sex case he was involved in.

The rapper left, but not long after -- around 6 p.m. -- a group of men arrived asking to join his party at the restaurant, sources said. They say a retired NYPD police officer working as a bodyguard refused to let them in, a fight broke out and one man from the group ended up smashing a chair on the bodyguard's head.

He opened fire and hit a man once in the torso, police said. At a police press conference Friday night, police said the man was licensed to use the gun.

Photos from the scene show a large police presence on 60th Street. A yellow cab with its door open is seen outside, cordoned off with police tape.

[NATL] Top Entertainment Photos: Best of the American Music Awards, and More

Police say the man managed to hail a cab on Madison Avenue and asked to go to the hospital, but the driver flagged down a police car instead. The FDNY says the victim was not seriously wounded and was taken to Weill Cornell Medical Center.

Earlier on Friday, a judge ordered 6ix9ine to serve four years probation and 1,000 hours of community service for violating the terms of a plea agreement stemming from his 2015 arrest for the use of a child in a sexual performance.

After court, 6ix9ine posted a photo of himself in a suit to Instagram with the caption "God is good".

He previously pled guilty after online videos surfaced of him sexually engaging with an underage girl in October 2015. At the time of the incident, Tekashi 6ix9ine was 18 while the victim was 13.