This document summarizes important events in late 18th and early 19th century Spain. It describes the reign of King Carlos III who modernized Spain's infrastructure. It then discusses the weak rule of Carlos IV and the influence of Prime Minister Godoy. Napoleon Bonaparte's invasion of Spain and installation of his brother Jose Bonaparte as king led to the Spanish War of Independence from 1808-1814. The Constitution of 1812 established Spain's first constitutional monarchy and granted rights to its citizens, though it initially excluded women and non-Catholics.