This paper analyses the involvement of the astrologer Manuel Galhano Lourosa in the restoration of political independence of Portugal from Spain between 1640 and 1668. Lourosa was the most successful astrologer and almanac maker in seventeenth-century Portugal. He published astrological almanacs for several decades, wrote an astrological and astronomical treatise on comets, and addressed astrological writings to Portuguese society urging support for the new political order that issued from the revolution of 1640. Some of these writings were consistent with the feelings of the urban professional and mercantile classes. We argue that, by publishing and using his social prestige in favour of the Restoration cause, Lourosa used the sphere of public opinion to act politically along with the interests of the urban middle class.