Savoy and France. This move showed worry on the part of Asti's neighbouring states over the excessive power gained by the city, which had captured Alba and controlled both Chieri and Turin. This state of affairs led to the intervention of Charles I of Anjou, then King of Naples and the most powerful man in Italy. After some guerrilla actions, Asti signed a pact of alliance with Pavia, Genoa and William VII of Montferrat. In 1274 the Astigiani troops were defeated at the Battle of Cassano, but, on December 12, 1275, were victorious over the Angevins at the Battle of Roccavione, ending Charles' attempt to expand in Piedmont. In the 1290s, after William VII had also been defeated, Asti was the most powerful city in Piedmont. However, internal struggles for the control of trading and banking enterprises soon divided the city into factions. The most prominent faction were the powerful bankers of the Solari family, who, in 1314, gave the city to king Robert of Naples. The free Republic of Asti ceased to exist. In 1339 the Ghibelline exiles recaptured the city, expelling the Solari and their allies. In 1342 however, the menace of the Solari counteroffensive led the new rulers to submit to Luchino Visconti of Milan. Visconti built a citadel and a second ring of walls to protect the new burgs of the city. In 1345, at the Battle of Gamenario, the Ghibelline Astigiani and John II of Montferrat again defeated the Neapolitan troops. John ruled over Asti until 1372, but seven years later the city council submitted to Galeazzo II Visconti's authority. Galeazzo in turn assigned it to Louis of Valois, Duke of Orléans. French and Savoyard domination With the exception of several brief periods under Visconti, Montferrat and Sforza rule, Asti remained under Valois control; it eventually became a direct subject of the French Crown. The situation changed in the early 16th century, during the wars between Charles V and Francis I of France. In 1526 it was besieged in vain by Charles' condottiero Fabrizio Maramaldo. Three years later, the Treaty of Cambrai assigned Asti to the German emperor, who in turn gave it to the viceroy of Naples Charles de Lannoy. After the death of the latter, Charles included it in Beatrice of Portugal's dowry, when she married Charles III of Savoy. Asti was one of the main Savoyard strongholds in later wars. In 1616,