Within the concerto, the cello plays the theme for the first three minutes, before the piano comes in. However, the gentler melodic piece that the piano plays soon gives way to a stormy theme in B minor. When the storm subsides, still in the minor key, the piano plays a transitional motif that leads to the key of F major, before the cello comes in to reprise, in the wrong key, and knowing that it has to get back to B major, the piano and the orchestra make a transition to finish off the theme in its original home key of B major. After the piano plays the transitional motifs, the piano quickly reprises the middle section in a major key before the final coda is established. The last movement consists of five clearly distinguishable sections, which introduce and develop five different themes. The first section (bars 1 to 64) presents themes 1 and 2. The first theme (also the "main theme") (1–8) is first played by the piano and then repeated by the orchestra. The second theme (16–20) is likewise presented by the piano and repeated – and expanded – by the orchestra. Finally, a kind of development of the first theme leads on to the next section. The second section (65–164) contains the next three themes. Theme 3 (65–73) is very different from the previous ones, due largely to its minor setting and its distinctive, Hungarian rhythm. Theme 4 (81–88) is still in a minor and theme 5 (97–104) is in F major. These three themes are each repeated back and forth several times, which gives the section the character of a development. The third section (165–308) can be seen as a reprise of the first; it is built on the first two themes, but a striking new element is given in 201–205 and repeated in 238–241. The fourth section (309–376) reprises themes 3, 5 and 4, in that order. The final section, the coda, is built on the main theme, but even here (398) Brahms presents a new element, restating the main theme in triple rhythm (a device he used earlier to end his violin concerto) over a little march, first played by the piano, then answered by the orchestra, which trades themes with the soloist before the final chords.