the elf-road through the wood which the dwarves had followed on the advice of beorn now came to a doubtful and little used end at the eastern edge of the forest ; only the river offered any longer a safe way from the skirts of mirkwood in the north to the mountain-shadowed plains beyond , and the river was guarded by the wood-elves ' king .