Renamed Martim de Freitas in 1806, she was part of the fleet involved in the transfer of the Portuguese court to Brazil during the Franco-Spanish invasion of Portugal.
The construction lasted for twenty-eight months; its launch took place on 29 January 1763, during the government of Marcos José de Noronha e Brito [pt], the 6th Count of Arcos and 7th Viceroy of Brazil.
The Portuguese expected Spanish attacks in the region and also planned to reconquer the part of the territory of present-day Brazilian state of Rio Grande do Sul that had been occupied by Spain as a result of the Fantastic War.
This prompted the formation of a naval division to be stationed in Santa Catarina, with Santo António e São José as its flagship, in order to provide support for the troops on land and patrol the coast.
[1] The instructions sent on 9 August 1774 by the Marquis of Pombal to the Viceroy of Brazil, Luís de Almeida Portugal, the 2nd Marquis of Lavradio, read:[7] "And ultimately considering the said Lord [the Marquis of Pombal] that the defense of said island [Santa Catarina], as the actions of his royal troops on the southern continent [Rio Grande do Sul] could not consolidate well without being assisted from the coast and the sea by a competent number of warships and frigates; using the above pretexts and similar ones, ordered to prepare and direct to this port of Rio de Janeiro, at the orders of Your Excellency the squadron of three ships of the line and four war frigates that are described in the fourth part of the aforementioned plan.
And he ordered, for the aforementioned squadron to be immediately deployed and ready there, the appointment of its commander and respective captains of sea and war, and their officers; The aforementioned squadron seemed to be enough for now, given the advantages that it shall have in those seas above any other like it, as it is superior in number; for our fleet and its ships will be able to sustain itself at sea at all times, having in its favour the ports of this capital, those of Santa Catarina Island and Rio Grande, of São Pedro (after having been purged [from the Spaniards], as we hope) to find in it shelter and asylum in case of any accident; as to their [Spanish] fleets and ships, they will have as enemies all the coast of Brazil that runs from Rio de Janeiro to the stormy Río de la Plata, without finding outside of this last one a place where they can avoid falling into our hands under a kidnapping, in cases where they are urgently constrained by storms and eventually shipwrecks that force them to take refuge in our ports in order to save their lives".
The following year, on 6 February 1776, at 15:00, Santo António e São José sailed from Santa Catarina towards Rio Grande do Sul accompanied by nine vessels: two frigates, two corvettes, three smacks, a brig and a sloop.
[8] Shortly after, heavy winds hit the squadron from the southeast, which caused a lot of problems to it, as it was anchored outside the port, which was occupied by both naval and land Spanish forces.
In the morning of February 19, the squadron, headed by Santo António, entered the port and attacked the enemy naval forces stationed there the next day.
[8] By the end of 1776, a large Spanish fleet consisting of 20 warships and 97 transport ships carrying 12 thousand soldiers divided into four brigades, was sailing in the southern Brazilian coast.
The Spaniards found official reports in the ships detailing the precarious state of the Portuguese defenses in Santa Catarina Island and decided to head there to attack and take control of it.
[11] On 23 May 1784, Bernardo Ramires Esquível [pt] was appointed commander of Santo António e São José; on 13 June, the ship carried out an armament display, having 421 men on board.
[12] The small Portuguese fleet that joined the allied naval forces consisted of the ships of the line Santo António e São José and Nossa Senhora do Bom Sucesso and the frigates Golfinho and Tritão.
[11][12] On 1 April 1794, back in Lisbon, the ship underwent general repairs and modernization; the works were completed on June 14 and the ship was renamed Infante D. Pedro Carlos in honor of the Spanish prince Pedro Carlos of Spain and Portugal, nephew of Portuguese prince John, future consort of Maria Teresa of Braganza, the Princess of Beira, and General Admiral of the Royal Portuguese Navy.
[3][13] After a series of trips from Europe to Brazil in the following years, D. Pedro Carlos once again underwent repairs in 1806, being renamed Martim de Freitas.
With the Napoleonic Wars raging in Europe and the subsequent French invasion of Portugal, the Portuguese royal family decided to flee to Brazil bringing with it its court.
D. Pedro Carlos was part of the fleet that brought the royal family to Brazil, departing from Lisbon on 29 November 1807 and reaching Rio de Janeiro in March 1808.
[14] After the return of king John VI to Portugal as a result of the Revolution of Porto, a letter of 26 October 1821 ordered the Prince Regent Pedro, his son, to make all the ships stationed in Brazil ready to return to Lisbon, these included the ships of the line Martim de Freitas, Vasco da Gama [pt] and Afonso de Albuquerque [pt].
Pedro quickly set out to create a naval force capable of facing off the Portuguese ships in Brazil and the ones that could eventually be sent from Europe in order to keep the territorial integrity of the empire.
Martim de Freitas, whose repairs were almost finished, was rearmed and incorporated into the newly formed Imperial Brazilian Navy, being renamed Pedro I in honor of Brazil's first emperor.
In the hope of finding a class of people for the flagship in which one could have more confidence, I authorized commander Crosbie to offer eight bucks per man from my pocket in addition to the prize given by the Government, and by this means I sought out some English and American sailors who, with those who came with me from Chile, were enough for the nucleus of future crew.
[21][20] On 2 August 1824, Pedro I left for Pernambuco, where the Confederation of the Equator had been proclaimed, flying lord Cochrane's pavilion and carrying troops from the army that landed in the port of Jaraguá [pt] in Maceió.
There, after requesting his payment, paying a portion that was his debt and satisfying the officers and crew, admiral Cochrane transferred his pavilion to the frigate Piranga, and sailed back to England.
However, he didn't reach his destination, having soon changed his course back to Rio de Janeiro, due to the death of his wife, empress Maria Leopoldina of Austria, on 11 December 1826.