Henry suffered a serious setback in 1437 after the failure of an expedition to capture Tangier, having encouraged his brother, King Edward, to mount an overland attack from Ceuta. The Portuguese army was defeated and only escaped destruction by surrendering Prince Ferdinand, the king's youngest brother. After the defeat at Tangier, Henry retired to Sagres on the southern tip of Portugal where he continued to direct Portuguese exploration until his death in 1460. In 1443 Prince Pedro, Henry's brother, granted him the monopoly of navigation, war and trade in the lands south of Cape Bojador. Later this monopoly would be enforced by the Papal bulls Dum Diversas  and Romanus Pontifex , granting Portugal the trade monopoly for the newly discovered countries, laying the basis for the Portuguese empire. A major advance which accelerated this project was the introduction of the caravel in the mid-15th century, a ship that could be sailed closer to the wind than any other in operation in Europe at the time. Using this new maritime technology, Portuguese navigators reached ever more southerly latitudes, advancing at an average rate of one degree a year. Senegal and Cape Verde Peninsula were reached in 1445. The first feitoria trade post overseas was established then under Henry's directions, in 1445 on the island of Arguin off the coast of Mauritania, to attract Muslim traders and monopolize the business in the routes traveled in North Africa, starting the chain of Portuguese feitorias along the coast. In 1446, Álvaro Fernandes pushed on almost as far as present-day Sierra Leone and the Gulf of Guinea was reached in the 1460s.
Question: Which happened first, the defeat at Tangier, or Henry retiring to Sagres?
Answer: defeat at Tangier