An arsonist set a restaurant on fire, injuring two people trapped by the flames, before setting blazes outside a nearby synagogue and funeral home, police said Tuesday.

A firefighter was also hurt battling the blazes, officials said.

The firebug was arrested shortly after she set the fires, all near Flushing Ave. and Grand Ave. in Maspeth, about 9 p.m. Monday.

Her blitz began when she set a fire inside 888 Kitchen, a Chinese restaurant on Flushing Ave. near 61st St., cops said. The fire quickly spread to the second floor, trapping a 26-year-old man and a 27-year-old woman inside an apartment.

The man injured his hand as he punched out a window to escape the flames, police said. The woman hurt her leg when she jumped out the window to the street below.

Medics took the pair to Elmhurst Hospital, where they were expected to recover. A firefighter was also hurt battling the blaze, which was put out within 20 minutes.

Meanwhile, the firebug headed west on Flushing Ave. until it turned into Grand Ave., cops said. There, she set small rubbish fires outside both D’Angelo Funeral Home and the Maspeth Jewish Center, which are about three blocks apart on Grand Ave.

Those two fires were put out quickly and damage was minimal, police said. Cops caught up with the woman after the third fire.

She was carrying no ID and cops are still trying to determine her identity. Criminal charges are pending against her.