Alonso Ramírez (born c. 1662, date of death unknown) was a sailor from San Juan, Puerto Rico, who was press-ganged into the crew of the English privateer William Dampier and subsequently became the first known person from the Americas to circumnavigate the world. His account of the voyage formed the basis of The Misfortunes of Alonso Ramírez, published by Carlos de Sigüenza y Góngora in 1690, which became widely popular and is often regarded as the first historical novel of the Americas.

A criollo born in the coastal capital of Puerto Rico, Ramírez's life took a turn for the worse early in his life, losing his wife in childbirth and prompting him to leave the Americas altogether. Ramírez arrived at the Philippines, then a Spanish colony in Asia, where he worked as a merchant sailor. Ambushed and taken aboard Dampier's flagship as its boatswain, he traveled with them through Asia, Oceania and Africa before going off on his own after arriving at the mouth of the Amazon. As captain of a frigate previously captured by Dampier, he found his way back to Yucatán before being shipwrecked.

Due to the sensational nature of the account and the serendipitous circumstances that allowed his survival, the existence of Ramírez was widely speculated to be a fictional creation for 317 years, until historical research validated several details of his account. Modern academics have noted that the account seems to have been expurgated, in which the Sigüenza y Góngora is complicit to an extent, arguing that several aspects of the narrative conveniently avoided incriminating details and that Ramírez' appearance indicated participation in numerous naval engagements. They suspect that the frigate was likely operating as a pirate vessel with Ramírez as its captain upon his return to the Caribbean, goading the Spanish authorities into reimbursing his sunken loot while avoiding punishment, retiring comfortably and living off the deception until his death.

Early life Childhood at San Juan Ramírez opened his account by establishing his "homeland as the city of San Juan of Puerto Rico". Ramírez took great pride in his Catholic faith and participated in the discrimination against Protestants that was widespread throughout the Spanish Main, considering them heretical. In his declaration, Ramírez gives his perception of the 17th Century city of San Juan and the socioeconomic dynamics of the era. He remembers the "beauty of its bay", praises the "incomparable" Castillo San Felipe del Morro (then still incomplete) and the other forts protecting Old San Juan. He frames its place within the Empire by noting that at the time the quality of water at Aguada made it famous in New Spain. Ramírez makes reference to the Taino name for the island, Borinquen, and gives the history of the island to that point, citing the gold deposits that were responsible for its name and the cocoa economy that followed. He notes that the cultural extinction and decimation of the natives was in part responsible for the population becoming poorer once hurricanes destroyed the plants, since there was a lack of workers.

His parents were poor at the time of his birth, his mother was a local from San Juan named Ana Ramírez, from whom he took his last name. His father was an Andalusian carpenter, though he was not sure of his exact birthplace, named Lucas de Villanueva. Ramírez was taught the craft from a very early age, but quickly grew unsatisfied with this line of work. Fearing that it would be insufficient to escape from poverty and hoping for a better life, he chose to leave Puerto Rico in search of fortune.

Traveling abroad and sailing At age 13, Ramírez boarded a hulk captained by a sailor named Juan del Corcho, with a stop at Havana. He was given the rank of boatswain among the crew and, despite considering it better and easier than crafting wood, was skeptical that it was capable of providing good fortune in the long run. From Havana, the vessel traveled to San Juan de Ulúa. Ramírez left the crew there, traveling to Puebla (then known as Puebla de los Ángeles), experiencing difficulty with the harsh weather that he had not faced during his island upbringing. He opted to stay there and try to find more lucrative opportunities than those of his ship, finding himself once again working as the apprentice of a carpenter. After six month, Ramírez was lamenting his decision to go abroad, having experienced worse quality of life than at San Juan.

Hopeful that nobleman Luis Ramírez would offer a better fate due to his blood relation to his mother, Ramírez left for the city of Huasca de Ocampo. However, after a long journey the aristocrat denied having any knowledge of their kinship and sent him on his way. He was then employed by a merchant named Juan López who, among his clients, counted the native tribes of the region. Once again, Ramírez was unsatisfied with the work, citing that the mountain trails only offered ample chance to be scared at the threat of landslides and numerous hazards of other kinds. With Lopez, he went as far as Guatemala, bartering and trading along the way. Arriving at Talistaca, the merchant fell gravely ill and was expected to die. While Lopez recovered, Ramírez spent time fantasizing about better and more lucrative lines of work. Upon arriving at Cuicatlán, the merchant suffered a fatal bout of the same illness. Ramírez received some reward from Lopez's inheritors, but considered it capricious, and returned to Puebla de los Angeles. There he was unable to find work, he chose to find a home at Mexico by marrying a noble orphan named Francisca Xavier, who was related to the church's dean. His wife died in child birth eight months later, after which he returned to Puebla de los Angeles and began working under carpenter Esteban Gutierrez. Unable to gain much money and depressed, Ramírez boarded the galleon Santa Rosa at Acapulco in 1682 aboard which he witnessed numerous Pacific islands.

Arriving at Cavite, he criticized the locals for being unreceptive and the port town for its weather, dangerous landscape and lack of fresh water. At Manila, Ramírez found a city where life was affordable and supplies available. As such, he decided to become a sailor and operate out of Cavite, a line of work that took him to Indian ports which he described as constantly requested and lucrative. Despite this, Ramírez expressed disgust at the religious practices there, calling the citizens "moors and gentiles" and lamenting that Catholicism wasn't practiced. He also traveled to Batavia, expressing fascination at the presence of international merchants and a large variety of merchandise and the Portuguese port of Macau.

Piracy and circumnavigation Captured by pirates Governor Gabriel de Cuzalaegui commissioned Ramírez as captain of a frigate with a crew of 25 men to bring provisions to Cavite from Ilocos. Ramírez complained that they were only give four short boarding pikes and two badly damaged muskets with five bullets for defense. On the way back, they noticed two vessels off Mariveles and were pursued by two small ships shortly afterwards. Despite ordering his men to stations, it became evident that the attackers were better equipped and the frigate was being peppered by shots. Eventually, the two larger vessels joined the engagement and the frigate was boarded by around fifty British pirates, who mocked them for the poor arsenal provided by the Spanish Crown.

As the captain of the frigate, Ramírez was taken aboard the flagship and introduced to the pirate captain, who received him with a joy that he considered hypocritical. Upon being queried about the wealth of the region, he feigned ignorance. When asked if their vessel could be supplied at Capones Island, Ramírez lied and said that the island was uninhabited as a ruse to have his captors ambushed. The pirate flotilla had two well provisioned ships, both armed with eight cannon and a large number of cutlasses, blunderbusses, harpoons, grenades and axes. One of them was commanded by master Bel and had a crew of 80, while the other was captained by Dunkin who had 70 sailors. Ramírez was tied to the mast and interrogated again while he and his crew were tortured. His Indian quartermaster revealed that Capones Island was actually inhabited and that Ramírez was an experienced sailor, so the pirates gave Ramírez a beating.

The Pacific and Asia Arriving at Côn Đảo, the Spanish frigate was sacked and set on fire. The local natives (identified as belonging to the Vietnamese ethnic groups from the Cochinchina) allowed the pirates to resupply and traded with them, beginning a stay of four months. Upon leaving, they killed most of the populace, ransacked and torched the village before setting sail. Despite providing a detailed account, Ramírez claims that he did not participate in the pillaging, always staying on the flagship. He went on to call the pirates "beasts" due to supposedly taking the charred arm of one of their victims and shared it among themselves in an act of cannibalism, before offering him a piece. Ramírez denies eating it, with his host being distracted by a toast.

Off the coast of Cambodia, they captured a prize which they stripped and set loose before leaving the crew at land. Anchoring at Hon Khoai island, they resupplied and Ramírez and his crew were told to make ropes with vegetation. There, the pirates captured a Siamese and two Portuguese vessels, all of them well supplied and carrying considerable treasure. Their crews were marooned, along some of the Spanish. At Siantan Island, they attacked the natives and took livestock and other provisions. After torching a settlement at the Tambelan Islands, they sailed to Borneo where they docked at Sukadana and requested permission from the governor to trade. After scouting the place for three days, the pirates launched a midnight attack plundering the Governor's House and taking him and others hostage, before taking what they could from the rest of the town before torching it and the ships docked there. The pirates took with them a considerable amount of diamonds and jewels, some of which Bel supposedly kept in his hat. After resupplying and dropping the hostages on land, they captured two "moor" vessels off the Bengal region, torching them and killing several in the process.

Oceania and Africa By this time, Ramírez noted that the pirate flotilla had been uncontested in all its naval engagements, citing knowledge that they were being hunted down. They soon found four well-armed Dutch warships, fleeing in the middle of the night and sailing to Aur Island, where they resupplied. Afraid of this development, the pirates escaped the area through the Singapore Strait, sailing as fast as possible but making a stop to board a frigate. The manned the ship with 14 armed sailors and ten cannons, assimilating it into the flotilla. The pirates sailed for weeks, eventually finding their way to Australia, finding unoccupied camps and ample food and water. Ramírez was placed in charge of fixing sails and cooking meat. After four months, the pirates set sail to Madagascar where after bartering for some livestock they also traded with a British merchant.