His unit was pinned down by a machine gun nest, and they were trying to outflank it and come at it from the rear. The rest of the flanking unit captured a number of Germans and between guarding them and trying to keep from being shot by the machine guns were trying to figure out what to do. York went on ahead to the machine gun emplacement and started picking them off one by one (as he put it, they had to stick their heads up to see him and he'd touch them off when they did) until a few rushed him. Eventually the German unit became so demoralized that the major surrendered his unit . As York was marching his 100 prisoners back to the American lines, they picked up a few others.
From his account ([link|http://www.alvincyork.org/Diary.htm|http://www.alvincyork.org/Diary.htm]),
There were considerably over 100 prisoners now. It was a problem to get them back safely to our own lines. There were so many of them, there was danger of our own artillery mistaking us for a German counterattack and opening upon us. I sure was relieved when we ran into the relief squads that had been sent forward through the brush to help us.
OCTOBER 8th 1918 (continued)
So when I got back to my major's p.c. I had 132 prisoners.
We marched those German prisoners on back into the American lines to the battalion p.c. (post of command), and there we came to the Intelligence Department. Lieutenant Woods came out and counted 132 prisoners. And when he counted them he said, "York, have you captured the whole German army?" And I told him I had a tolerable few.