qnli question: In the aftermath of which war was the U.S. granted Puerto Rico? sentence: Puerto Rico has been under U.S. sovereignty for over a century when it was ceded to the U.S. by Spain following the end of the Spanish–American War, and Puerto Ricans have been U.S. citizens since 1917.