SAN SALVADOR, El Salvador — A major fire broke out in El Salvador’s Finance Ministry on Friday, killing at least two people, injuring 22 others and prompting some inside to jump from the building before the blaze was extinguished, officials said.

The country’s president, Salvador Sánchez Cerén, said on television that one woman, a union worker, had died, while another person had died in a hospital. Three more people were in surgery, he said.

Earlier, an emergency services spokesman, Carlos Fuentes, said a man had died from burns and smoke inhalation on the fifth floor of the nine-story building in the capital, San Salvador. It was unclear if this was the same person mentioned by the president.

Video showed one person jumping from the top of the building and landing heavily on a lower roof near the ground. Emergency services officials said the man was in grave condition in a hospital.