The structure of boundary layers (BLs) and wall heat flux is investigated as they evolve during the compression stroke in an optically accessible, single-cylinder research engine of passenger-car dimensions with a typical four-valve pent-roof design operated at motored and throttled conditions. Three-dimensional Direct Numerical Simulations (DNS) of the compression stroke were carried out, which enable full resolution in space and time of all flow and temperature field structures in the entire domain, including the BLs. Since the high computational cost precludes calculation of the scavenging cycle, scale-resolving simulations were employed to provide initial fields for the DNS at intake valve closure. The analysis revealed that BLs deviate from ideal scaling laws commonly adopted in algebraic wall models, and that the non-zero streamwise pressure gradient correlates with changes in the near-wall profiles. Phenomenologically,