Queens prosecutors have upgraded charges against a man accused of setting a Flushing building fire that killed four people in March.

Roman Amatitla now faces first-degree murder, arson and other charges after he allegedly used matches to start the blaze and watched the building burn while drinking beer.

The 38-year-old Maspeth resident followed a woman into the ground floor of the building on March 16, the Queens district attorney’s office said.

Prosecutors alleged Amatitla started the fire by lighting a piece of paper and placing it on top of trash at the base of the building’s only stairwell exit serving the upper floors. Authorities said he later went to a nearby bodega on Main Street to charge his phone.

Three of the victims, including 3-year-old Sihan Yang, died from smoke inhalation, according to prosecutors. A fourth victim died after jumping from a window to escape the fire, suffering multiple broken bones and brain trauma.

Seven other people were injured in the blaze, including two FDNY firefighters who were treated for smoke inhalation and burns.

“As alleged, Roman Amatitla killed four people, including a 3-year-old girl, when he torched the building where they lived,” Queens District Attorney Melinda Katz said in a statement. “He continues to be held in custody to assure accountability. This was a horrific crime that shocked the city.”

If convicted, Amatitla faces up to life in prison without the possibility of parole. He is scheduled to return to court on July 14.

An attorney representing Amatitla did not immediately respond to a request for comment.