Here's how Megatrain betrayed Spencer in Thomas' Place as a Prime.
Spencer: Once we find your machine and bring back your army, the world we'll be ours!
Megatrain: Ours? [laughs]
Spencer: What's so funny?
Megatrain: I used you. So you can help me kill Tirek.
Megatrain: Besides, who said that anyway?
Spencer: You did.
Megatrain: Yes. But it was not meant to be.
Spencer: You sold me out? [then J.J.'s words hit him]
J.J.: [in Spencer's mind] You can't do this Spencer! He'll betray you! It's what's inside that counts!
Megatrain: You were created by humans, to obey humans. We can never be partners.
Spencer: But you said we were partners!
Megatrain: You, were the one who chose my side. You made the choice to side with me, you made the same mistake I did when Tirek was working with me. He betrayed me, I betray you. [he walks away]
[our heroes manage to break out of the cage]
Terence: Spencer, you saw this comin' didn't you?
Spencer: I didn't, I truly didn't. Now I know how Ernie feels.
Steamy: Spencer, you may hold the key to the world's survival. Yav' got ta' tell the others wer' Megatrain is goin'. You know wer' his machine is.
Spencer: You're right, I must stop this traitor from destroying this world! [he blows his whistle bravely and starts racing off to find the others]