The death of King Belshazzar (Dan 5:30-5:30)

“That very night

King Belshazzar,

The Chaldean king

Was killed.”

Right after Daniel became the 3rd in command, this Chaldean King Belshazzar was killed. How did he die? Apparently, the Medes and Persians invaded Babylon without any resistance. They took over and killed the sitting king. Was there any connection to the hand writing on the wall and Daniel’s intervention? Did this mean that Daniel was now 2nd in command? What would happen to him?