のだと思った

thought that …

→ の
phrase Common #6,771
thought that … のだ adds an explanatory or emphatic tone to what the speaker thought. The subject of 思った is often left unstated and understood from context.
JA: 彼はもう帰ったのだと思った。
EN: I thought he had already gone home.

メアリーはトムが困っているのだと思った。

Mary thought Tom was in trouble.

夢を見ていたのだと思った。

I thought I had been dreaming.

警察はトムを探しているのだと思った。

I thought the police were looking for Tom.

私は雨が降り始めたのだと思った。

I thought it had started raining.

私は彼が正直と言うより賢明なのだと思った。

I thought he was wise rather than honest.