Shane Bauer , Sarah Shourd and Josh Fattal were detained by Iranian authorities on July 31 after allegedly crossing the border while hiking in the mountains of Iraq 's Kurdistan region .