2007 against Arsenal, but his potential move to Manchester City fell through half an hour before the close of the transfer window. He eventually admitted he made a mistake by joining Tottenham on a permanent deal. He ended the 2006–07 season with 23 appearances and 5 goals. Middlesbrough Tottenham agreed a £6 million fee with Birmingham City for Mido on 20 July 2007. Birmingham manager Steve Bruce said the move was close to collapsing, as the deal reportedly faltered over the wages and the length of contract Mido was demanding. The deal eventually fell through over a clause that Mido insisted be in the contract. In August 2007 Sunderland made a £6 million bid for him and held talks, after which Birmingham confirmed they were trying to revive their deal to sign Mido. Middlesbrough then revealed their interest in signing him, matching the £6 million fee of Birmingham and Sunderland and were given permission to speak to him. They eventually signed Mido for a fee of £6 million on a four-year contract on 16 August 2007. He scored on his debut for Middlesbrough against Fulham and on his home debut against Newcastle United. During the Newcastle game, Mido was reportedly subject to Islamophobic abuse from some Newcastle supporters, which The Football Association (The FA) was to investigate. He suffered a stress fracture to the pubic bone which kept him out for more than three months from November 2007 until he returned to first-team action for Middlesbrough's 2–0 FA Cup victory over Mansfield Town on 26 January 2008. He was sent off in the 80th minute in a match against Arsenal on 15 March 2008 after kicking Gaël Clichy in the face with his boot, which resulted in him receiving a three-match ban. Mido was ruled out for the remainder of the 2007–08 season in April following a hernia operation on a pelvic injury. He made the bench for Middlesbrough's opening Premier League fixture against former club Tottenham and came on as a substitute in the 82nd minute and scored four minutes later after deflecting Didier Digard's shot. The following weekend saw him score against Liverpool at Anfield to put Middlesbrough 1–0 in the lead, but they eventually lost the game 2–1. This was followed up with goals against Yeovil Town in the League Cup and Portsmouth in the league. Mido was again targeted by some Newcastle fans while warming up