Two separate fires broke out near two major transit hubs Wednesday morning, causing major delays for commuters.

Crews responded to the Graybar Building on Lexington Ave. above Grand Central Terminal around 9:30 a.m.

Fire officials said the two-alarm fire started in a utility room on the mezzanine.

The first three floors of the building were evacuated, and six people suffered minor injuries from smoke inhalation, the fire department said. Subway and Metro-North service were not affected.

Firefighters were able to get the flames under control by 11 a.m. after breaking through a window to get into the room.

Witness: They told us to stay put, you know. Only the second and third floors were evacuated. That was it.

NY1: What floor were you on?

Witness: 8

NY1: Did you smell any smoke?

Witness: Oh yeah.

Meanwhile, at Penn Station, a small fire on track 14 broke out at around 10 a.m.

Amtrak officials said it was caused by debris and was quickly put out.

There were no evacuations, and Amtrak said no one was injured.