Eating in the subway system shouldn’t be banned, as the MTA chairman is considering, Mayor Bill de Blasio said Wednesday.

Instead, the mayor said, the transportation agency ought to consider “education” and enforcing littering bans to discourage riders from tossing trash onto the tracks, which causes fires and delays service.

“I don’t think it’s fair to say to people, you can’t eat on the subway. I think it is right to say we gotta figure out how to stop the track fires from the trash on the tracks,” de Blasio said in Queens at an unrelated news conference.

After a garbage fire crippled Monday’s morning commute, MTA chairman Joe Lhota said the agency would increase track cleaning and had begun an internal “debate” about “what foods are appropriate” to eat on the subway.

Lhota’s comments followed a track fire ignited by trash near Harlem’s 145th Street station. Subway service along the A, B, C and D lines was disrupted for more than two hours during Monday’s morning rush hour peak. Nine people were treated at hospitals for minor injuries.

advertisement | advertise on newsday

According to the most recent figures available, subway fires caused 844 train delays in April.

As recently as 2012, in his prior stint as MTA boss, Lhota opposed a food ban. He said too many children eat breakfast on the trains en route to school, and a ban would disproportionately impact minority communities.

De Blasio said he rode public transit exclusively for the two decades during which he didn’t own a car. A food ban would have been “inconceivable” to him in those years, he said.

“We’re all incredibly busy in this city,” he said. “The time on the subway is often the only time you have to eat.”

Still, of riders who toss trash onto the tracks, de Blasio said: “Talk about something that’s going to come back to bite you.”