Endoscopic devices and methods used for fastening multiple tissue layers, such as, for example, an endoscopic fundoplication procedure, are disclosed. The endoluminal device includes a tissue fastener, a flexible needle having means for grasping and releasing a portion of the tissue fastener, and a deflector for deflecting and guiding the needle toward the multiple tissue layers.