José died of smallpox at the age of 27, causing his younger and ill-prepared brother, Infante João, to become heir-apparent and eventually King. João's reign would be a turbulent one, seeing Napoleonic invasion of Portugal and the loss of the Portuguese Empire's largest and wealthiest colony, Brazil.