Who has taken Thorin prisoner before the other dwarves attack?

In J.R.R. Tolkien's novel "The Hobbit," Thorin Oakenshield, the leader of the dwarves, is taken prisoner by the wood-elves led by Thranduil.