The deal, which will promote Toyota's RAV4 4x4 model, marks the first sponsorship by the Japanese car giant since it cut short its tie-up with ITV's coverage of Formula One earlier in 2004. It will be the first spend on the brand this year.
The fourth series of the show begins on 26 October. The car manufacturer's sponsorship will cover nine 60-minute episodes and a one-off Christmas special.
Idents created by Toyota's ad agency Saatchi & Saatchi will feature a RAV4 in the classroom mimicking the actions of a group of unruly schoolchildren.
Matt Harrison, Toyota's UK marketing director, said the sponsorship was an ideal fit because the RAV4 has 'always seemed to have a rebellious and slightly unconventional positioning'.
The deal was negotiated by ZenithOptimeda's sponsorship arm, Alliance, and Channel 4 sponsorship.
Toyota opted to pull out of its £25m broadcast sponsorship of ITV's Formula One programming, two years early, last October, choosing instead to plough the £6m annual cost into broader brand advertising (Marketing, 29 October).
The Daily Telegraph has since taken over the sponsorship.
Last month the car firm announced record annual UK sales of 22,333 and a market share of 5.2%.
Toyota attributed this to the success of its Yaris model as well as the RAV4, which topped its sales target by 10%.