The Latvians needed to beat Kazakhstan and erase a huge 16-goal margin while hoping the United States would lose against Russia later in the day .