The Portuguese armed forces had a long tradition dating back to Portugal's founding in the 12th century. Portuguese militia units under King Afonso Henriques secured Portugal's independence from the Kingdom of Leon and later participated in its own version of the Reconquista against the Moors in the 12th to 15th century. When Portugal became a maritime power in the 15th century, its ships and soldiers traveled the world, helped make colonies like Angola and Brazil, and fought their maritime rivals, the Dutch, as well as the Chinese.
They had to contend with their rivals, the Spanish, in different wars. The Portuguese military defeated the forces of the Spanish king Philip IV to win back their independence in the 1640s. Later, the Portuguese military will participate in the War of the Spanish Succession and three more wars with Spain.
In the Napoleonic era, the Portuguese military repulsed the French army, but barely. French General Junot occupied Lisbon, but the Portuguese LaResistance proved to be too strong. It did help that the British aided the Portuguese in expelling the French from Portugal. The French attempted to invade Portugal again, but the Portuguese, along with the British and Spanish guerrillas, routed the French out.
Later, the Portuguese military were involved with both sides in the Liberal Wars of 1828-34, a civil war between Dom Pedro (who by then, was the ex-ruler of Brazil), and Dom Miguel who was the king of Portugal at that time. Dom Pedro's daughter, Queen Maria da Gloria, eventually won the war.
By the turn of the 20th century, the Portuguese military helped instigate a coup that ended the Portuguese Monarchy in 1910. The Portuguese later joined World War I on the Allied side, fighting in Africa (its colonies were threatened by the German general Lettow-Vorbeck) and in Europe.
Under Premier Salazar's rule, the Portuguese sent 18,000 volunteers in the UsefulNotes/SpanishCivilWar on the side of Franco. In 1939, the governments of Salazar and Franco signed the Iberian Pact, ensuring neutrality for both sides in World War II. To ensure the neutrality, foreign policy relied on helping both parties in non compromising ways; namely selling (legally) wolframium to the axis, and allowing the construction of the Azores air base, possible by the Treaty of Windsor with the United Kingdom, the [[BindingAncientTreaty oldest mutual assistance treaty]] ''[[http://en.wikipedia.org/wiki/Treaty_of_Windsor_1386 still active]]'' (1386!). The air base was later assigned to the United States and it still stands active (albeit with lesser importance) nowadays.
The Portuguese military since World War II had to contend with African independence movements, as well as the Indian seizing of Goa in 1961. However, many leftist military officers were tired of the war and were disillusioned with Portuguese premier Marcello Caetano, that they, along with left-wing protesters, initiated a revolution in 1974 known as the Carnation Revolution. It also restored Portuguese democracy and eventually the Portuguese military retired from politics.
Although conscription was the rule before, it was abolished in the 2000s. The Portuguese military today is professionalized though there are many complaints of lack of manpower. The country was a founding member of NATO.
The military is composed of the Army, the Navy, the Air Force, and the gendarmerie, the National Republican Guard.
Definitely not to be confused with a Portuguese man o' war, which is a highly venomous jellyfish-like creature (although the Portuguese Navy did operate its namesake, the Portuguese [[https://en.wikipedia.org/wiki/Man-of-war man-of-war]], back in the [[WoodenShipsAndIronMen Age of Sail]]).