The major indexes in the United States were all down more than 3 percent but then staged a turnaround in the final hour.