Luís do Rego, 1st Viscount of Geraz do Lima

D. Luís do Rego Barreto, 1st Viscount of Geraz do Lima (28 October 1777 – 7 September 1840), better known as General Luís do Rego, was a Portuguese nobleman, military officer and colonial administrator who distinguished himself in the fight against the Invasion of Portugal by the French in 1807, and was Governor of Pernambuco from 1817 to 1821, when he was deposed.

Early life
Natural son of António do Rego Barreto, army officer, adjutant of the 2nd Count of Bobadela when he was governor das armas of Minho, was legitimized by his father in 1786, enlisted in 1790 at age 13, at the Infantry Regiment of Lippe, the Lisbon garrison, being lieutenant when the French invaded Portugal in 1807.

Having asked to resign when the Portuguese army, it was reorganized in early 1808, he returned to Viana do Castelo. When Porto rose against collaboration with the French occupiers, Luís organized a provisional government junta in Viana do Castelo, who promoted him to major and instructed to organize the 9th Infantry Regiment, garrison of the city.

Peninsular War
Organized the 4th Caçador Battalion of Beira, in Viseu, having participated with him in the 1808–1811 campaigns, the Battle of Buçaco, in 1810, to Battle of Pombal, in the beginning of the withdrawal of the army of Masséna, and the Battle of Fuentes de Oñoro in 1811. Participated in the Siege of Ciudad Rodrigo and, as commander of 15th Infantry Regiment, the Siege of Badajoz. Was present at the Battle of Salamanca in 1812 and the Battle of Vitoria in 1813. Their performance in the Siege of San Sebastián was critical, able to cross the gulf separating the allied army from the fortress with his regiment and scaled the walls, managing to take it in September 1813. Luís commanded the 3rd Portuguese Brigade of the Army until 1815.

Governor of Pernambuco
In 1817 he was appointed governor of the Captaincy of Pernambuco. He was hated by the local population, because he used violent methods to repress the separatist revolt that broke out there. He promoted hangings, quartering of bodies, firing squads, deaths by fire, desecration of corpses and rapes. Many of the executed individuals were innocents. With the change of government that took place in Portugal in 1820, he did fulfill the orders of constitutional government in Lisbon. Victim of an assassination attempt, he returned to Portugal in 1821.

Back in Portugal
Luís do Rego was appointed governador das armas of Minho by the constitutional government, he was in charge of crushing the revolt of the 2nd Count of Amarante, future Marquis of Chaves, who defeated Amarante in February 1823. With the Vilafrancada reimposing the absolutist regime in Portugal, he was removed from office and deported to Figueira da Foz, and retired in the following year. He reentered the army during the regency of Maria II of Portugal, he was promoted to lieutenant general in 1827.

Arrested during the reign of King Miguel, he managed to escape to Spain, returning after the Concession of Evoramonte. Appointed member of the Supreme Council of Military Justice in 1834, he was reappointed governor of weapons of Minho during the setembrismo, who appointed him senator for Viana do Castelo, during the short duration of the 1838 Constitution.

The setembrista government of Maria II awarded him the title of Viscount of Geraz do Lima on 27 April 1835.