If you do something unwittingly, you do it without realizing it.
He was unwittingly caught up in the confrontation.
他无意中陷入了这场冲突。