The incommensurately modulated structures of the isostructural blue bronzes of K and Rb with modulation wavevector q = a* + 0.748 (1)b* + 1/2c* at 100 K have been determined by X-ray diffraction. The lattice parameters of the C-centred monoclinic cell for K0.3MoO3 are: a = 18.162 (2), b = 7.554 (1), c = 9.816 (1) angstrom, beta = 17.393(6)degrees, V = 1195.7 angstrom3, Z = 20, mu = 55.7 cm-1, lambda = 0.7107 angstrom, M(r) = 156.9. For Rb0.3MoO3: a = 18.536 (2), b = 7.556 (1), c = 10.035 (5) angstrom, beta = 118.52 (1)degrees , V = 1234.9 angstrom3, Z = 20, mu = 110.0 cm-1, lambda = 0.7107 angstrom, M(r) = 172.4. The symmetry of the structure can be described as consisting of a one-dimensionally modulated system with the four-dimensional superspace group C(s 1BAR)C2/m (0beta1/2). Th final R(F) = 0.033 for 7985 reflections for the K bronze and 0.032 for 4458 reflections for the Rb bronze. In the modulated structure, valence calculations show that the phase transition to the semiconductor state is accompanied by ordering of Mo5+ along the infinite-chain direction. The metallic conductivity, with delocalization of 4d electrons between clusters by overlapping Mo-O-Mo orbitals along the infinite-chain direction, tums into semiconductor properties by localization of 4d electrons on individual Mo(2) and Mo(3) octahedra (not on Mo10O30 clusters as a whole), modulated with wavevector q. By a comparison of the structures of the blue and red bronzes, their physical properties can be interpreted.