The main aim of the present study was to examine the effects of long-term supplementing diets with saturated or unprotected polyunsaturated fatty acids from two different plant oils rich in either n-3 or n-6 fatty acids (FAs) plus docosahexaenoic acid (DHA)-rich algae on mammary gene expression and milk fat composition in lactating dairy cows. Gene expression was determined from mammary tissue and milk epithelial cells. Eighteen primiparous German Holstein dairy cows in mid-lactation were randomly assigned into three dietary treatments that consist of silage-based diets supplemented with rumen-stable fractionated palm fat (SAT; 3.1% of the basal diet dry matter, DM), or a mixture of linseed oil (2.7% of the basal diet DM) plus DHA-rich algae (LINA; 0.4% of the basal diet DM) or a mixture of sunflower oil (2.7% of the basal diet DM) plus DHA-rich algae (SUNA; 0.4% of the basal diet DM), for a period of 10 weeks. At the end of the experimental period, the cows were slaughtered and mammary tissues were collected to study the gene expression of lipogenic enzymes. During the last week, the milk yield and composition were determined, and milk was collected for FA measurements and the isolation of milk purified mammary epithelial cells (MECs). Supplementation with plant oils and DHA-rich algae resulted in milk fat depression (MFD; yield and percentage). The secretion of de novo FAs in the milk was reduced, whereas the secretion of trans-10,cis-12-CLA and DHA were increased. These changes in FA secretions were associated in mammary tissue with a joint down-regulation of mammary lipogenic enzyme gene expression (stearoyl-CoA desaturase, SCD1; FA synthase, FASN) and expression of the regulatory element binding transcription factor (SREBF1), whereas no effect was observed on lipoprotein lipase (LPL) and glycerol-3-phosphate acyltransferase 1, mitochondrial (GPAM). A positive relationship between mammary SCD1 and SREBF1 mRNA abundances was observed, suggesting a similar regulation for these genes. Such data on mammary gene expression in lactating cows presenting MFD contribute to strengthen the molecular mechanisms that govern milk fat synthesis in the mammary glands. In purified MEC, the dietary treatments had no effect on gene expressions. Differences between mammary tissue and milk purified MEC gene expression were attributed to the effect of lipid supplements on the number of milk purified MEC and its RNA quality, which are determinant factors for the analysis of gene expression using milk cells.