The 2006–07 season started well for Wrexham, as they went 8 games unbeaten, with included a 4–1 away win against Championship side Sheffield Wednesday and were in the play-off places after the addition of numerous new faces. Unfortunately they were beaten in a shock 5–0 defeat at Accrington Stanley on 13 September 2006, then followed by a 5–2 defeat at Stockport County. Both of these teams were struggling at the foot of the table when these defeats happened, and Wrexham never fully recovered from them. This would begin the start of a long relegation battle for Wrexham. Denis Smith was sacked along with his assistant Kevin Russell on 11 January 2007 with Wrexham in the bottom half of the division and after a poor run of results and was replaced by coach Brian Carey. Wrexham finished 19th in Football League Two and on 51 points after an impressive late run of form which saw them win 4 out of their last 5 games, which included defeating local rivals Shrewsbury in the last derby match at Gay Meadow. Wrexham's league status was saved on the last day of the season with a vital 3–1 victory on 5 May 2007 over Boston United at home which sent their opponents down to the Conference Premier (they were later demoted to the Conference North) and ensured that Wrexham would stay in the Football League.