Ribosomes are responsible for protein synthesis in both prokaryotic and eukaryotic cells.