The flag of El Salvador was inspired by the flag of the Central American Union, and by the flag of Argentina, the country that sent one of the first fleets to help consummate the independence of Central American republics from Spain.
There are two versions of the flag, one containing the National Coat of Arms and the other the words "DIOS UNION LIBERTAD" (Spanish: God, Union, Liberty). The one bearing the Coat of Arms is used by the government or state organizations. The other version is used for civil purposes. Both flags have a 3:5 aspect ratio.
From 1865 to 1912, a different flag was in use, based on the flag of the United States, with a field of alternating blue and white stripes and a red canton containing white stars.