William II Sánchez, Duke of Gascony from circa 961 at least until 996, was the younger illegitimate son of duke Sancho IV and successor, around 961, of his childless elder brother, Duke Sancho V. He united the County of Bordeaux with the Gascony. Documents of his reign state that his grandfather came from Iberia, lending credence to "phantasmagorical" genealogies placing the origins of García II Sánchez across the Pyrenees. He died in 996 or 997 and was succeeded by his son, Bernard William. Around 970, William was using only the title of count as when "Lord William Sánchez, count of the Gascons" donated land in the village of "Luco Deo" to the monastery of Saint Vincent-de-Lucq. He inherited the county of Bordeaux from his cousin William the Good, son of his aunt Entregodis, who married one Raymond, and united it to Gascony permanently. He later carried the ducal title. Aimoin entitled him "Count of Bordeaux and duke of all Gascony" in his biography of Abbo of Fleury. Before 977, William also added the Agenais and the Bazadais. This expansion of the duchy was probably the cause of an increase in our information about the region and its dukes after a period of obscurity lasting from the Viking raids of the 840s. In 977, William restored the priory of La Réole, using the title of dux Wasconum. He was not at that time employing the title Count of Bordeaux. He was in possession of Bordeaux by 988, when he sought the advice of the council of seniores of Bordeaux for the restoration of the monastery of Saint-Sever. While Gascony had long been out of the orbit of the French kings, Bordeaux had not been. With its acquisition, William began dating his charters by the reign of the king, Hugh Capet, with the clause "King Hugh reigning". During the reign of William II, his brother Gombald, the "Bishop of the Gascons", established control over all the dioceses in Gascony and eventually became Archbishop of Bordeaux. The entire Gasconchurch hierarchy was controlled by William's family. When William travelled to Navarre to join the Reconquista and combat Muslims, he left Gombald in charge in Gascony. In Navarre he acquired a wife, but was forced to return to Gascony as Viking raids became increasingly serious. He defeated the Vikings at Taller in 981 or 982, and they ceased to be a serious threat after that. Their permanent settlements along the Adour were removed and they were driven back into the north, the pays de Born-Landes. William might be the "Count William Sánchez" who, according to Sampiro, defeated the Vikings in Galicia in 970. No Galiciam of that name is known from the 10th century, but neither is there any other record of William Sánchez travelling to Galicia. It has been proposed, however, that the duke of Gascony was on a pilgrimage to the shrine of Saint James at Compostela when, in an emergency, he took command of the defences during a Viking attack.
Brisca married duke William V of Aquitaine as his second wife and brought a claim on Gascony to the House of Poitiers, which eventually passed to them, in the person of Brisca's son Odo on the death of Sancho VI.