Since the birth of Portuguese statehood, its flag was directly associated with the coat of arms of the king, and until 1640 it was literally the same thing. Each era added its own symbols, and although there is no documented information about the flags of the XII and earlier centuries, many legends and legends can tell us about this period.

The first symbol of heraldry, which could be linked to the state and possession of Portugal, was the shield of Count Henry of Burgundy during the battle with the Moorish hordes in 1095 – a blue cross on a white field. This is not documented and, by a strange coincidence, most often scientists made the corresponding discoveries during the Portuguese dictatorship "Nuova Estrada", which sought to close the faded present with a heroic past.
His son, Alfonso Enrique, having received the shield by inheritance, retained the emblem. In 1139 he defeated the enemy with the overwhelming majority of the enemy and called himself king of Portugal - the first. Four years later, recognition was received from neighbors from Leon, and the shield was replaced, thus reflecting the renewal of political status. According to sources, the blue shield was decorated with 5 smaller ones with 11 carnations depicted on each; one in the center and 4 in the corners. According to some reports, the Besantes meant the right to mint their own money.
At that time, after the war, the shields were not repaired or repaired, severed corners or downed paint were ubiquitous. By the time Sancho I, the son of the previous one, became king of the state, part of the paintwork was damaged or lost. After reflection, they decided to leave it as it is, and a single cross turned into five groups, and the cross thus became symbolic. The same image was used by his son, the second of this name.
Then the straight line was stopped, and the throne passed to the youngest son of Alfonso II - he could not use the father's coat of arms in its original form by law. Therefore, having married a Castilian princess and the daughter of Alphonse X, he added to his shield the image of the castle as the coat of arms of the kingdom of his wife. Then this castle turned into a red border around the perimeter, in which several castles were added - at different times from 16 to 7, finally decided on their number only by the end of the XVI century.
The inside of the shield remained unchanged, but the number of coins changed. This version was used until the extinction of the dynasty from Burgundy in 1383, after which a couple of years in the state there was a civil war.
Only in 1385 the country had a new sovereign - Juan I of the House of Avis. On his personal coat of arms, he added a lily of green color, several such flowers were introduced into the red border instead of Castilian castles: only the last 12 remained, and coins - 7 (instead of eleven).
In 1485, the grandson of this king removed the lilies, fixed five coins on each of the shields and reduced the number of locks to seven. After his death, the design underwent radical changes. It changed shape: if the former banners were square, it became elongated and was a rectangle of white color with a coat of arms including 11 castles, crowned with the crown of the king. At the same time, an armillary sphere appeared on the flag for the first time - a navigation tool of that era.
Minor decorative and cosmetic changes accompanied each change of ruler. This continued until 1578, when the king died in another battle with the Muslims and Philip of Spain became the ruler of the country. This unification was accompanied by the condition that the countries would continue to be separate monarchies and Portugal would never become a province of the empire.
The reform retained the old flag, independent of the Spanish, its army and navy, but the kings never forgot about their interests and the fact that the Portuguese kingdom is a temporary acquisition. The colonies of the latter constantly became the object of interest of English and Dutch privateers, and the authorities in the El Escorial did nothing to combat this.
The national nobility revolted in 1640, as a result of which the Duke of Braganza named John was made king, the fourth with this name. At this time, the only change was that the shield in the coat of arms became rounded.
By the end of the XVII century, the country's merchant fleet lost the right to demonstrate state symbols - this mercy was allowed only to ships with at least two dozen guns and fifty crew members. Smaller ones had to settle for striped green and red flags. Green and white were also used for pennants.
This went on for another two hundred years. Portugal is a irele, shifting to the sidelines of world history. After the capture of the country by Napoleonic soldiers in 1807, the king had to flee to the New World, the capital was moved to Rio de Janeiro, and 8 years later, in gratitude for this, the state of Brazil was transformed into an equal status of Portugal and the Algarve royal possession; all together received the name of the United Kingdom.
The new coat of arms paid tribute to the old part of the monarchy - the shield of Portugal, and added a new - yellow armillary ball with blue filling. Both symbols were crowned with a five-arched crown. Despite the fragility of the transcontinental monarchy and its collapse with the declaration of independence by the Kingdom of Brazil in 1822, this symbol was used for another four years - until the death of the king. Then the sphere was again postponed until better times.
Colour
Like everyone else, the colors of the national flag have an interpretation. During the nationalist regime, green was designed to symbolize hope, and red was the blood of martyrs for the state.
Until 1910, the current heraldic colors were not associated with national symbols, although they were used by many rulers of the country. The red cross of the Order of Christ was used as a flag on the ships of sea travelers at the time of great discoveries. Green was first introduced in 1640, during a revolt against Spanish rule.
A popular view is that the colors reflect the symbolism of the Republican Portuguese Party, one of the main driving forces behind the 1891 uprising in Porto and the 1910 revolution. Red also dates back to 1891 and symbolizes the desire for freedom and Freemasonry, while green - positivism and the politics of republicanism.
Armillary sphere
We are talking about the instrument of navigation and astronomy, which was used by navigators from Portugal during geographical discoveries. At this time, the country was at the forefront of studying the world and expanding its limits. Then the sphere became a Portuguese symbol and even appeared on the flag of the ruler of the country Manuel I.
At the same time, this image adorned the sails and flags of the fleet circulating between the New and Old Worlds; the sphere was also placed on the flag of Brazil shortly after independence in 1822.
Portuguese shield
Above the sphere is the shield of Portugal - one of the oldest symbols of the state, first appeared in the time of Sancho the First.
The history of heraldic change is reflected above; now let's talk about the immaterial, but essential. Legend has it that the shield appeared on the eve of the Battle of Ourica in July 1139 with Arab invaders during one of the stages of the Reconquist. To the Portuguese count, who later became king, a monk appeared, who acted as the voice of God. He announced that early in the morning, during the ringing of bells, he should leave the tent. When the future king did this, he saw Jesus crucified on the cross, and he told the warlord that he would observe the outcome of the battle. The battle was crowned with victory. During the battle in martial arts, Alphonse managed to kill 5 kings of Arab tribes, and he took their shields as trophies.
Hence the five shields on the coat of arms, and five bezantov - those allegedly symbolize not coins, but nails and a wound from the spear of Longinus. For the first time the legend was noted only in the XV century and most likely apocryphal, but interesting.