This study aimed to evaluate the transcriptional changes occurring in isolated perfused mammary alveolar tissue in response to inoculation with S. agalactiae and to identify the most affected biological functions and pathways after 3 h. Four udders taken at slaughter from cows with healthy mammary gland were perfused ex situ with warmed and gassed Tyrode's solution. Mammary alveolar tissue samples were taken from the left fore and rear quarters (IQ-inoculated quarters) before inoculation (hour 0) and at 3 h post inoculation (hpi) and at the same times from control right fore and rear quarters (not inoculated: NIQ). A total of 1756 differentially expressed genes (DEGs) were identified between IQ and NIQ at 3 hpi using edgeR package. Within this set of DEGs, 952 were up regulated and mainly involved with innate immune response and inflammatory response, e.g., CD14, CCL5, TLR2, IL-8, SAA3, as well as in transcriptional regulation such as FOS, STAT3 and NFKBIA. Genes down-regulated (804) included those involved with lipid synthesis e.g., APOC2, SCD, FABP3 and FABP4. The most affected pathways were chemokine signaling, Wnt signaling and complement and coagulation cascades, which likely reflects the early stage response of mammary tissue to S. agalactiae infection. No significant gene expression changes were detected by RNA-Seq in the others contrasts. Real time-PCR confirmed the increase in mRNA abundance of immune-related genes: TLR2, TLR4, IL-1β, and IL-10 at 3 hpi between IQ and NIQ. The expression profiles of Casp1 and Bax for any contrasts were unaffected whereas Bcl2 was increased in IQ, which suggests no induction of apoptosis during the first hours after infection. Results provided novel information regarding the early functional pathways and gene network that orchestrate innate immune responses to S. agalactiae infection. This knowledge could contribute to new strategies to enhance resistance to this disease, such as genomic selection.