BUSHWICK — He made a hail of a getaway request.
A gun-toting teenager fleeing from an undercover cop ducked into a city elementary school Tuesday afternoon and asked the security desk to call him a cab, sources said.
Earl Gilbert, 17, was carrying a 9mm handgun when he raced into Bushwick's P.S. 45 Horace E. Greene at 3:19 p.m. and was confronted by school security officers, sources said.
He then allegedly asked them for help calling a taxi and discreetly tried to ditch his pistol. But cops caught up with Gilbert moments after he entered the school and arrested him, court records show.
He was charged with a top count of criminal possession of a weapon in the second degree, two counts of reckless endangerment, criminal trespass and trespass, according to the Brooklyn District Attorney's Office.
City Department of Education spokeswoman Marge Feinberg confirmed the arrest, but said the incident was not school-related.
"The arrest was made after general dismissal and the school was in lockdown for 15 minutes," Feinberg said.
Additional reporting by Heather Holland