The Spanish governor in Portugal was thrown out of a window, thus ending Spanish rule in Portugal in 1640.