L train commuters got a bit a nasty surprise Thursday morning: Manhattan-bound trains were delayed after an incident at Union Square-14th St. around 8:45 a.m.

L trains were terminating at Bedford Ave. in Williamsburg due to a train with mechanical problems at Union Square around 8:30 a.m., stranding commuters in Brooklyn just ahead of rush hour. Trains had resumed by 9 a.m., but there were still residual delays.

"L train, I defend you all the time, but you are on my last nerve," tweeted one rider.