Hull have signed the Egypt international for £2 million.
He told Hull's official website, hullcityafc.net: "It feels great to be here permanently, especially after what happened here last season. It was a great year and I thoroughly enjoyed playing for this club.
"Everything about it was great - the players, the staff, the fans - and I am delighted to be here again.
"It's going to be great to play in the Premier League again, especially with Hull City, and I am very much looking forward to the new season.
"Moving here was an easy decision to make. The fans are fantastic and it will be enjoyable to play in front of them in the Premier League."
He added: "The manager was the one who brought me over from Egypt to play for Sunderland and now he has brought me here. I really enjoy playing for him and I look forward to doing so again now."