Tondo Conspiracy (also known as Conspiracy of the Maharlikas) was a plot against the Spaniards in 1587 when Agustin de Legazpi, his cousin Martin Pangan, and some fellow rebels conspired against the Spanish government situated in the Philippines due to the injustices felt by the Filipinos. It was territorially one of the largest conspiracies against the Spanish rule next to the Katipunan. It ranged from provinces near Manila all the way to Calamianes islands near Palawan.
Legazpi sought help from a Japanese sea captain named Juan Gayo and asked for arms and warriors to fight alongside them in exchange for one-half of the tribute collected in the Philippines. They also requested help from places such as Borneo, Laguna, and Batangas with a plan to assault the city of Manila and assassinate the Spaniards. However, their plan was discovered by the Spaniards when Magat Salamat revealed their plan to fellow rebel Antonio Surabao who turned out to be a traitor when he reported the conspiracy to the Spaniards. Consequently, the rebels associated with the conspiracy were all punished with some put to death and others exiled and the plot against the Spaniards died along with them.
Numerous datus were not in favor of the Spanish rule as they had conflicting interests with regard to authority and freedom. An instance of such is the waning obedience of the slaves to the datus. This was brought about by the initiatives of the Spaniards to abolish slavery in hopes of shifting the slaves' allegiance from the datus to the kingly Spaniards. Furthermore, this elimination of slavery had institutionalized how the slaves were obligated to pay their tributes to the Spaniards instead of the datus. They had been reduced to vassalage, thus the plan of rebellion of the datus against the Spaniards.
Martin Pangan, who was accused of adultery, Agustin de Legazpi, who was accused of not paying fees as governor of Tondo, Gabriel Tuambasan, and Pitonggatan all met in jail, where they made a pact of the datus to aid each other in times of need and hardship. They also made a pact to stand united against the Spaniards, though they did not know in which manner yet.
After they got out of jail, Martin Pangan (who was exiled from Tondo) went to live in a village in Tambobong, Navotas (known today as Malabon), where he, along with Legazpi, planned a secret meeting. They reached out to the datus of Pandacan, Navotas, Taguig, Maysilo, Catangalan, and many others in the Manila area and of nearby provinces such as Candaba, Pampanga who had been thinking of starting an uprising for quite some time then. With a pseudo reason of visiting their dear friend Pangan, arrived Agustin Manuguit and his father Felipe Salalila (chief from Maysilo), Magat Salamat (chief of Tondo), Pedro Balinguit (chief from Pandacan), Geronimo Basi and Gabriel Tuambasan (Legazpi's brothers), Luis Amanicalao and his son Calao, Dionisio Capolo (chief of Candaba) and his brother Felipe Salonga (chief of Polo), Felipe Amarlangagui (chief of Catangalan), Francisco Acta (another chief from Tondo), and Omaghicon (chief of Navotas). Timawas, servants, and other allies were also invited to the secret meeting.