Fetching details from the dictionary...

by no means; never!; well, I never!; you don't say!; no way!
certainly (not); surely (not); hardly (expected)
something unexpected; emergency
indeed; really; truly; unexpectedly
まさかこんなことになるとは。
I never expected things to turn out this way.
まさか合格するとは思わなかった。
I never thought I would pass.
まさかの展開に本当に驚いている。
I am surprised by this unexpected development.