The invention provides a surgical fastening or suturing device. The device of the invention has a slender shaft and an actuating mechanism configured to eject a surgical fastener from the distal end of the shaft or configured to perform suturing at the distal end of the shaft. The device also has an attachment arrangement for attaching a piece of surgical mesh material onto an external lateral surface of the shaft and around the distal end of the shaft.