by chance
I found it by chance.
Estábamos sentados juntos por casualidad.
We were sitting together by chance.
— Hable con ella (2002)
Fue por casualidad que ambos viajábamos en el mismo tren.
It was by chance that we were both traveling on the same train.
Estaba tumbado sobre una trampilla, no está ahí por casualidad.
He was lying on a trapdoor; he's not there by chance.
— Harry Potter y la piedra filosofal (2001)
Encontré el libro en esa librería por casualidad.
I found the book in that bookstore by chance.
Me encontré con él por casualidad en el tren esta mañana.
I ran into him by chance on the train this morning.