Questions & Answers about Pensé que era una broma, pero en realidad hablaba en serio.
This is a very common Spanish tense pattern.
- Pensé is preterite because it refers to a completed mental action: I thought
- Era and hablaba are imperfect because they describe how something seemed / was at that time
So the sentence is structured like this:
- Pensé = one completed moment of thinking
- que era una broma = what I believed the situation was
- pero en realidad hablaba en serio = what was actually going on
Spanish often uses:
- preterite for the main event
- imperfect for background, description, or ongoing context
Because era focuses on how the speaker understood or interpreted the situation at the time.
- era una broma = it was a joke / I thought it was a joke
- fue una broma would sound more like identifying it as a completed fact or event
Here, the speaker is not saying what it truly was. They are saying what they believed it was. That is why era fits better.