A man died and a second man is clinging to life after a fire tore through their Queens apartment building early Monday, FDNY and NYPD officials said.

A firefighter was also seriously hurt fighting the blaze that broke out on the second floor of the five-story Sunnyside building about 2:35 a.m., FDNY officials said.

Firefighters found a 61-year-old man dead in the building on 40th St. near Queens Blvd. His name was not immediately released.

Medics rushed a 60-year-old man to Elmhurst Hospital in critical condition.

FDNY Fire Marshals investigate a fatal fire in a Sunnyside apartment building on Monday morning.

Theodore Parisienne / New York Daily News

FDNY Fire Marshals investigate a fatal fire in a Sunnyside apartment building on Monday morning. (Theodore Parisienne / New York Daily News)

A firefighter was rushed to New York-Presbyterian Hospital Cornell Weill with serious but not life-threatening injuries, officials said.

The fire was brought under control in just over 40 minutes.

The cause of the fire is under investigation.

The fire broke out on the second floor of the five-story building on 40th St. near Queens Blvd. about 2:35 a.m., FDNY officials said.

Theodore Parisienne / New York Daily News

The fire broke out on the second floor of the five-story building on 40th St. near Queens Blvd. about 2:35 a.m., FDNY officials said. (Theodore Parisienne / New York Daily News)