An Uber driver’s excuse for failing a drug test was fully baked — and bought!

Ibrahim Turay, whose license was suspended when he tested positive for marijuana, got it back after neighbors and family convinced a judge that he unknowingly ate a doped-up chocolate cake.

Turay told Administrative Law Judge Kevin Casey that he dropped into a neighbor’s “tattoo” party July 21 and went home with a treat, not knowing it had been baked with THC-laced ­butter.

Turay said he became sick that night and was stunned when he failed his annual drug test administered by the Taxi and Limousine Commission four days later.

The neighbor later wrote a notarized letter to Casey saying she hadn’t told Turay about the funny butter until learning his license had been suspended — and felt guilty. Casey believed Turay, and his license was restored.

Reached outside his Brooklyn home, Turay called the experience “traumatizing. I’m very grateful for the outcome.”