{'fraction_non_alphanumeric': 0.04195877094680879, 'fraction_numerical': 0.02426311537358943, 'mean_word_length': 4.719481293784469, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 2, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Impaired ketogenesis ties metabolism to T cell dysfunction in COVID-19

Anorexia and fasting are host adaptations to acute infection, and induce a metabolic switch towards ketogenesis and the production of ketone bodies, including β-hydroxybutyrate (BHB)1–6. However, whether ketogenesis metabolically influences the immune response in pulmonary infections remains unclear. Here we show that the production of BHB is impaired in individuals with SARS-CoV-2-induced acute respiratory distress syndrome (ARDS) but not in those with influenza-induced ARDS. We found that BHB promotes both the survival of and the production of interferon-γ by CD4+ T cells. Applying a metabolic-tracing analysis, we established that BHB provides an alternative carbon source to fuel oxidative phosphorylation (OXPHOS) and the production of bioenergetic amino acids and glutathione, which is important for maintaining the redox balance. T cells from patients with SARS-CoV-2-induced ARDS were exhausted and skewed towards glycolysis, but could be metabolically reprogrammed by BHB to perform OXPHOS, thereby increasing their functionality. Finally, we show in mice that a ketogenic diet and the delivery of BHB as a ketone ester drink restores CD4+ T cell metabolism and function in severe respiratory infections, ultimately reducing the mortality of mice infected with SARS-CoV-2. Altogether, our data reveal that BHB is an alternative source of carbon that promotes T cell responses in pulmonary viral infections, and highlight impaired ketogenesis as a potential confounding factor in severe COVID-19.

Sickness behaviours are an evolutionarily preserved coordinated set of adaptive behavioural changes, including lethargy, fever, social withdrawal and loss of appetite, that have evolved to support the survival of the host in response to infections [1][2][3] . Human and animal data show that infection-induced anorexia and the induction of ketogenesis-a well-described host metabolic adaptation in response to fasting 4 -are promoted in the context of respiratory viral infections 5,6 . This indicates that infectious diseases and host metabolism are intimately linked 7 . However, the physiological role of ketogenesis during an infection remains unclear 2 . Although host metabolic adaptations that are shaped by evolutionary pressure in response to endemic viruses are conserved 7 , they may be dysfunctional in the context of emerging zoonotic infections. This idea is of particular note in light of the current pandemic of COVID-19, which is caused by the zoonotic virus SARS-CoV-2 (refs. 8,9 ). In the majority of infected people, the host immune response is sufficient to resolve the infection. In some cases, however, dysfunctional immune responses may result in severe pathology in the lungs and systemically 10,11 . Two of the main cellular immune populations involved in the clearance of the viral infections are CD4 + type 1 helper T (T H 1) cells and CD8 + cytotoxic T cells, which act through the production of cytokines such as interferon-γ (IFNγ) and through the killing of infected cells. Cellular metabolism and mitochondrial function are major determinants of T cell activation and function 12 , which raises the question of a potential link between infection-induced ketogenesis and T cell immunity.
To investigate a possible connection between infection-induced metabolic alterations and immune responses in the host in the context of severe pulmonary infections, we examined differences in viral-infection-related ketogenesis. This was achieved by assessing Article the production of the ketone body BHB in mice infected with influenza A virus (IAV) (Extended Data Fig. 1), in the peripheral blood of patients with COVID-19 who were hospitalized (termed 'moderate'), and in the peripheral blood of ventilated patients with ARDS caused by SARS-CoV-2, influenza or bacterial respiratory infections, with the latter included as a non-viral control ( Fig. 1a and Extended Data Table 1).

Ketogenesis is impaired in COVID-19
Mice that were infected with IAV showed a reduction in body weight, food consumption and glucose levels, but an increased concentration of BHB in the serum and an upregulation of genes encoding enzymes that control ketogenesis in the liver (Hmgcs2 and Cpt1) (Extended Data Fig. 1a-c). Consistent with the mouse data, levels of BHB were increased in the serum of patients with influenza in comparison to healthy control individuals, indicative of infection-induced ketogenesis (Fig. 1b). By contrast, patients with moderate and severe COVID-19, but also patients with bacterial pneumonia, had low concentrations of BHB (Fig. 1b). This suggests that infection-induced ketogenesis may be compromised in COVID-19 ARDS. Notably, pre-existing metabolic disorders, including high blood glucose in type 2 diabetes and obesity, are major risk factors for increased lethality in patients with 14 ). Both insulin and glucose are routinely administered to patients with ARDS, together with enteral and parenteral feeding, to maintain stable concentrations of blood glucose. We observed increased concentrations of glucose in patients with COVID-19 ARDS in comparison to patients with moderate COVID-19 and healthy control individuals (Fig. 1c). However, we did not find a substantial difference in the concentration of  IFNG  CXCL10  MX1  IFITM3  ISG15  RSAD2  IFI44L  IFI27 IFN signalling In u e n z a a, Overview of the cohorts and the samples included in the study. Figure created using BioRender.com. b, Serum concentration of BHB in healthy donors (n = 39; black), patients with moderate COVID-19 (n = 46; purple) and patients with ARDS due to COVID-19 (n = 64; red), influenza (n = 32; blue) or bacterial pneumonia (n = 15; yellow). c,d, Serum concentration of glucose and insulin in the indicated cohorts (c) and quantification of pro-inflammatory cytokines in the serum (d). e-g, RNA-seq analysis of cells from the BALF from patients with COVID-19 ARDS (n = 19; red) and influenza ARDS (n = 9; blue). e, Heat map of differentially expressed genes (P < 0.05) (around 700 differentially expressed genes in total). f, Pathway analysis. g, Heat maps showing the fold change of genes associated with fibrosis, extracellular matrix (ECM) remodelling and interferon signalling. h, Relative expression of IFNG and ISG score (as a mean of interferon-stimulated gene (ISG) expression; IFITM3,  IFI27, IFI44L, IFIT1, MX1, ISG15, MX2, RSAD2 and SIGLEC1) in the BALF of patients with COVID-19 ARDS (n = 13) and influenza ARDS (n = 7). i,j, Quantification of the indicated cytokines (i) and fibrotic biomarkers ( j) in the BALF of patients with COVID-19 ARDS (n = 38) and influenza ARDS (n = 12) ARDS. In b-d,h-j, each dot represents a donor. Data are mean ± s.d. Statistics were assessed by non-parametric one-way ANOVA (Kruskal-Wallis test) corrected for multiple comparisons by two-stage linear step-up procedure of Benjamini, Krieger and Yekutieli (b-d), or by two-tailed Student's t-test (h-j); not significant .(not indicated), P > 0.05; *P < 0.05; **P < 0.01; ***P < 0.001. glucose or insulin, or in the total calories supplied, between COVID-19 and influenza or bacterial ARDS ( Fig. 1c and Extended Data Fig. 2a,b). Moreover, neither the total amount of supplied calories nor the concentration of blood glucose correlated with systemic levels of BHB (Extended Data Fig. 2c,d), thus arguing against the involvement of these parameters in the differential regulation of BHB production. In line with previous reports [15][16][17] , patients with severe COVID-19 had increased concentrations of inflammatory cytokines in comparison to patients with moderate symptoms or uninfected control individuals (Fig. 1d). However, patients who were infected with SARS-CoV-2 showed substantially lower expression of the inflammatory cytokines interleukin (IL)-6 and IL-8, in comparison to patients with influenza-ot bacteria-induced ARDS (Fig. 1d). This challenges the initial hypothesis of a cytokine storm, and indicates that immune dysregulation could be a major driver of severe COVID-19, as has been suggested previously 18,19 . Most notably, we observed lower concentrations of interferon-related cytokines, including IFNγ, IFNλ and IFNγ-induced protein-10 (IP-10), in patients with COVID-19 relative to patients with influenza (Fig. 1d). We did not find any significant difference in type I interferons (Fig. 1d). To validate our findings at the site of infection, we next performed a bulk RNA-sequencing (RNA-seq) analysis of cells from bronchoalveolar lavage fluid (BALF) that was isolated from patients with severe COVID-19 and patients with influenza. Despite the high degree of transcriptional similarity (Extended Data Fig. 3a; Gene Expression Omnibus (GEO) accession code GSE207077), pathway analysis revealed an enrichment in genes related to the remodelling of the extracellular matrix and pulmonary fibrosis in COVID-19 ARDS ( Fig. 1e-g). On the other hand, genes associated with interferon signalling were increased in influenza ARDS, which we further confirmed by quantitative PCR with reverse transcription (qRT-PCR) ( Fig. 1h and Extended Data Fig. 3b). Supporting our findings in peripheral blood, pro-inflammatory cytokines and factors that mediate antiviral defence were markedly reduced in the BALF of patients with COVID-19 ARDS compared to the influenza cohort (Fig. 1i). We also detected a significant increase in proteins related to pulmonary fibrosis in the BALF of COVID-19 ARDS (Fig. 1j), in agreement with the finding that collagen deposition and the development of fibrosis is particularly pronounced in COVID-19, in contrast to influenza ARDS 20 .
An impaired CD4 + T cell response has been suggested to be a hallmark of severe COVID-19 (refs. [21][22][23][24][25][26][27]. Previous work reported the beneficial effects of a ketogenic diet during IAV or coronavirus infections in mice 28,29 or found that BHB promotes the function of effector and memory CD8 + T cells 30,31 . However, it is unclear whether and how ketogenesis influences CD4 + T cell immunity. To investigate this aspect, we added BHB to CD4 + T cells in diluted cell culture medium (1:1 with phosphate-buffered saline (PBS)), to more closely resemble the limited availability of nutrients in infection. T H 1-polarized human and mouse CD4 + T cells showed an increase in numbers and enhanced production of IFNγ but not tumour necrosis factor (TNF) when cultured with BHB ( Fig. 2a,b and Extended Data Fig. 4a-h). Consistent with previous reports 31 , BHB had a similar effect on CD8 + T cells (Extended Data Fig. 4a-h). Of particular note, knockdown of the gene BDH1, which mediates ketolysis ( Fig. 2c and Extended Data Fig. 4i,j), reverted the BHB-induced increase in IFNγ in both mouse and human T H 1 cells (Fig. 2d,e). The BHB-mediated expansion of T H 1 cells was not due to accelerated proliferation (Ki-67; Extended Data Fig. 4k-n), but dependent on increased survival (annexin V; Extended Data Fig. 4o). Thus, BHB may be an important fuel to support the fitness of T cells in nutrient-deprived microenvironments in severe virus-induced inflammation.

BHB supports mitochondrial metabolism
In light of the ability of BHB to alter the functionality of CD4 + T cells, we used extracellular flux analysis. Addition of BHB increased both the basal and the maximal rate of mitochondrial respiration and enhanced the spare respiratory capacity after short-term (day 3) (Extended Data Fig. 5a) and long-term (day 6) culture of mouse T H 1 cells (Fig. 2f). This increase in OXPHOS appears to be independent of glucose (Extended Data Fig. 5b,c). Notably, ablation of OXPHOS by simultaneous inhibition of complex I, III and V of the respiratory chain reduced the capacity of human CD4 + T cells to produce IFNγ and TNF (Extended Data Fig. 5d,e), without affecting their survival (Extended Data Fig. 5f). We further established the ability of BHB to enhance the mitochondrial functionality of CD4 + T cells with SCENITH (single-cell energetic metabolism by profiling translation inhibition) 32 . Using SCENITH on cultured mouse and human T H 1 CD4 + T cells, we confirmed that adding BHB to CD4 + T cells increased the mitochondrial dependence and reduced the glycolytic capacity (Extended Data Fig. 5g,h). However, these metabolic adaptations were highly dependent on BDH1-mediated ketolysis (Fig. 2g). Likewise, we observed that BDH1 increased the ability of activated CD4 + T cells to metabolize fatty acids and amino acids in the presence of BHB while reducing their glucose dependence; this indicates that there is some flexibility in nutrient usage, which is crucial to support cellular fitness (Fig. 2g, Extended Data Fig. 5g,h). Moreover, in line with the role of BHB in supporting OXPHOS in CD8 + T cells 31 we observed similar metabolic changes when human (but not mouse) CD8 + T cells were cultured with BHB (Extended Data Fig. 6a-c). As increased OXPHOS and mitochondrial function have been linked to the capacity of cells to produce IFNγ 33,34 , BHB-dependent bolstering of OXPHOS may act preferentially to promote the effector function of CD4 + T cells.

BHB provides an alternative fuel for T cells
To further investigate the metabolism of BHB in CD4 + T cells, we performed tracing of 13 C-labelled BHB in cultured mouse T H 1 cells. 13 C-tracing experiments revealed that T H 1 cells can use BHB as a carbon source for intermediates in the tricarboxylic acid (TCA) cycle ( Fig. 3a and Supplementary Table 1). By contrast, carbons from 13 C-labelled glucose were exclusively incorporated into intermediates of glycolysis and the pentose phosphate pathway ( Fig. 3a and Supplementary Table 1). Moreover, labelled carbons from BHB were also found in bioenergetic amino acids (glutamate and aspartate) and oxidized glutathione (GSSG) (Fig. 3a), whereas the reduced form (GSH) was not detected (Supplementary Table 1). We confirmed the integration of BHB in TCA cycle intermediates and bioenergetic amino acids in CD4 + T cells in IAV-infected mice in vivo and ex vivo (Extended Data Fig. 7a,b). As balanced levels of cellular reactive oxygen species (ROS) are crucial for maintaining T cell function 12,35 , glutathione oxidation might be a mechanism that is exploited by T cells to avoid ROS-induced oxidative stress caused by enhanced OXPHOS. Indeed, we found no significant increase in cellular ROS after the addition of BHB (Extended Data Fig. 7c). Furthermore, when we examined the expression of genes encoding enzymes that act as metabolic gatekeepers in CD4 + T cells, we found a BHD-induced upregulation of Cpt1 (fatty acid oxidation), Got1 (amino acid metabolism), Ndufs8 (OXPHOS), Sdha, Sdhb, Sdhc (TCA cycle) and Txnrd1 (redox balance) ( Fig. 3b and Extended Data Fig. 7d). Notably, severe COVID-19 is characterized by amino acid catabolism and a reduction in the levels of circulating amino acids 36,37 . We therefore analysed a previously published metabolomic dataset of patients with COVID-19 with different levels of disease severity (1-7, quantified by the World Health Organization ordinal scale) 36 . Consistent with previous reports, we found reduced amounts of tryptophan, bioenergetic amino acids and cysteine in the serum of patients with COVID-19 ARDS (Fig. 3c), indicating an overall reduction in amino acid availability. Reduced cysteine suggests a possible impairment in the GSH/GSSH balance and the cellular oxidation state (Fig. 3c). We did not observe any change in valine (a branched-chain amino acid) or lysine (Extended Data Fig. 7e), which are crucial for T cell activation and function 38 . Notably, addition of BHB was able to increase the numbers and functionality of cultured human CD4 + T cells, even in the absence of amino acids ( Fig. 3d and Extended Data Fig. 7f). Thus, our data show that BHB acts as an alternative carbon source that promotes Article T cell responses in nutrient-deprived environments, and this may be relevant in the context of severe viral infections.

Nutritional ketosis promotes antiviral immunity
T cells in severely ill patients with COVID-19 have been described as containing dysfunctional mitochondria 39,40 . Our bioenergetic analysis and tracing experiments suggest that BHB is crucial to support mitochondrial function during viral infections. Flow cytometric analysis revealed that CD4 + and CD8 + T cells from the blood and BALF of patients with COVID-19 ARDS had high levels of PD-1 expression, a sign of potential exhaustion and dysfunction (Extended Data Fig. 8a). To gain insight into the metabolic features of T cells in COVID-19 ARDS, we used SCENITH to analyse a subgroup of patients with COVID-19. T cells in the BALF and blood of individuals with SARS-CoV-2-driven ARDS exhibited a significantly altered metabolic profile towards glycolysis, with a concomitant reduction in mitochondrial dependence ( Fig. 4a and Extended Data Fig. 8b). In addition, we observed that although BALF T cells shifted their metabolic dependence towards glucose, T cells in the blood of individuals with COVID-19 ARDS still showed a residual capacity to oxidize fatty acids and amino acids ( Fig. 4a and Extended Data Fig. 8b). Owing to the reduced amounts of BHB and amino acids available in COVID-19 (Figs. 1b and 3c), this capacity might not be sufficient to sustain mitochondrial function. Because we and others have shown that mitochondrial respiration is required for the maintenance of T H 1 cell function 41 , these results offer a potential explanation for defective adaptive immune responses in severe COVID-19.
We therefore hypothesized that supplementing BHB through a ketogenic diet consisting of a 4:1 ratio of fat to proteins and carbohydrates 42,43 could reprogram the metabolism of CD4 + T cells, thereby increasing their functionality in severe pulmonary viral infections. Feeding mice a ketogenic diet increased the amounts of BHB in circulation and in lung tissue (Extended Data Fig. 8c). In line with our in vitro data, we observed an increase in the percentage and total number of IFNγ + CD4 + T cells, which was accompanied by a concomitant reduction of PD-1 in CD4 + T cells of IAV-infected mice that were fed a ketogenic diet ( Fig. 4b and Extended Data Fig. 8d). Furthermore, supplying mice with a ketogenic diet resulted in a metabolic reprogramming of lung CD4 + T cells towards OXPHOS and a reduction in their glycolytic capacity (Fig. 4c). Consistently with human BALF (Fig. 4a), we also found increased glucose dependence in lung CD4 + T cells of infected mice (Fig. 4c). A ketogenic diet also decreased glucose dependence in favour of the capacity to oxidize amino acids and fatty acids. Transcriptional and protein analysis revealed that a ketogenic diet downmodulated transcripts (Fig. 4d) and proteins that are associated with fibrosis and tissue remodelling (Fig. 4e), supporting the notion that increases of BHB and IFNγ are related to attenuated fibrosis. A ketogenic diet also led to reduced lung damage (total protein in BALF) (Fig. 4f), accelerated viral clearance  (c,d). Each dot represents a donor 36 . Data are mean ± s.e.m. Statistics were assessed by two-tailed Student's t-test (a) or by non-parametric one-way ANOVA (Kruskal-Wallis test) (c,d); not significant (not indicated), P > 0.05; *P < 0.05; **P < 0.01; ***P < 0.001.

Article
(Extended Data Fig. 8e) and recovery from weight loss (Extended Data Fig. 8f). A reduction in total protein and fibrosis-associated proteins in BALF, as well as a decrease in collagen deposition, tissue density and lung injury score, indicated a faster resolution of inflammation in mice that were fed a ketogenic diet (Extended Data Fig. 8g-i). Furthermore, increasing the availability of circulating BHB by supplying esterified BHB in the drinking water 44 (Extended Data Fig. 9a,b) enhanced the responses of T H 1 cells (Extended Data Fig. 9c), while reducing lung damage (Extended Data Fig. 9d) and the expression of genes and proteins associated with fibrosis in IAV-infected mice (Extended Data Fig. 9e,f). Treatment with ketone ester also diminished the dependency of CD4 + T cells on glucose but promoted their potential to oxidize amino acids and fatty acids (Extended Data Fig. 9g). Furthermore, treatment with BHB resulted in improved mitochondrial functionality and oxidation of fatty acids and amino acids, concomitantly leading to a reduction in glycolysis in CD4 + T cells from patients with severe COVID-19 (Fig. 4g). Although these T cells exhibited substantial expression of PD-1 ex vivo (Extended Data Fig. 8a) and in vitro (Fig. 4h), treatment with BHB increased the number of CD4 + T cells and the production of IFNγ, but decreased the expression of PD-1 (Fig. 4h). Delivery of ketone ester in a preclinical model of SARS-CoV-2 infection in K18-hACE2 mice 45 reduced the dependence on glucose but enhanced the potential of CD4 + T cells to oxidize amino acids and fatty acids, increasing their production of IFNγ and viral clearance (Fig. 4i,j and Extended Data Fig. 10a). Moreover, ketone ester promoted a faster recovery from weight loss and reduced lung injury, resulting in improved overall survival (Extended

Fig. 4 | BHB rescues the metabolism and function of T cells in severe viral
infections. a, Analysis of CD4 + T cells by SCENITH in the blood of healthy donors (HD; n = 11) and in the blood (n = 8) or BALF (n = 5) of patients with COVID-19 ARDS. b-f, C57BL/6 mice were fed a control diet (CD) or a ketogenic diet (KD) for seven days, infected with IAV, euthanized and analysed on day 10. b, Representative flow plots, percentage and total number of IFNγ + CD4 T cells (n = 12 in each group; naive n = 11), IFNγ gMFI (n = 7 naive and CD; n = 8 KD), c, Analysis by SCENITH of lung CD4 + T cells (n = 9 naive; n = 8 CD and KD). d, Expression of fibrotic genes from BALF cells (n = 8 in each group). e, Soluble collagen (n = 9 naive, n = 10 CD, n = 11 KD) and MMPs (n = 9 naive, n = 10 CD and n = 11 KD). f, Total protein (n = 13 naive, n = 15 CD and n = 16 KD). g,h, CD4 + T cells were isolated from the blood of patients with COVID-19 ARDS and cultured under T H 1 conditions, with or without 5 mM BHB. g, Analysis by SCENITH (n = 5).

Discussion
Here we show that SARS-CoV-2-induced immune dysregulation correlated with an attenuated increase in BHB in the circulation, which indicates that infection-induced ketogenesis is impaired in COVID-19 but not in influenza ARDS. Although the underlying reasons for this disparity are yet to be determined, we show that BHB substantially boosts the antiviral immune response by promoting the production of IFNγ and the survival of human and mouse CD4 + T cells. In COVID-19 ARDS, T cells are exhausted and skewed towards glycolysis, probably as a result of reduced oxygenation of the pulmonary tissue 46 . BHB not only rewires T cells to OXPHOS by fuelling the TCA cycle, but also promotes the synthesis of amino acids that are depleted in COVID-19 ARDS 36 . Consequently, impaired ketogenesis and production of BHB in COVID-19 ARDS may be at the root of the metabolic dysregulation and defective effector function of T cells, and may predispose patients to pulmonary pathology, including fibrosis. Indeed, lower serum concentrations of IFNγ in patients with COVID-19 have been linked to an increased risk of developing pulmonary fibrosis 47 . Our results thus indicate that an additional mechanism beyond immune overactivation underlies severe COVID-19 pathology 46 . We reveal ketogenesis as a metabolic program that promotes type 1 immunity and prevents the pathogenic remodelling of the airway epithelial tissue. Although, therapeutic (as opposed to prophylactic) relevance has yet to been assessed, our discovery highlights the potential of BHB and a ketogenic diet as a broadly applicable treatment to enhance functional T cell responses in nutrient-deprived environments, which are commonly observed in the context of infections but also tumour growth. In summary, our study establishes a better understanding of how dysregulated host metabolic adaptations to infections may contribute to poor outcomes in COVID-19.

Online content
Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/s41586-022-05128-8.

Mice
C57BL/6 (wild-type) and K18-hACE2 transgenic (K18-hACE2) mice were bred in-house or purchased from Charles River or The Jackson Laboratory and maintained at in-house facilities. All mice were kept under specific-pathogen-free conditions. All procedures were performed according to ethical protocols approved by the ethics committee of North Rhine-Westphalia. All mice used were male and female between 6 and 20 weeks of age. Mice were randomly assigned to the control and ketogenic diet groups or to the control and ketone ester groups. Animal experiments were not done in a blinded manner as the investigators needed to design and conduct experiments and analyse the data.

Isolation of cells from blood and tissue samples
Serum samples from patients with moderate COVID-19 or ARDS due to influenza, COVID-19 or bacterial pneumonia were obtained from University Hospital Bonn (n = 79), Radboud University Medical Center Nijmegen (n = 35), University Hospital Essen (n = 21) and Hannover Medical School (n = 20). ARDS was defined according to the Berlin definition. Blood from healthy donors and BALF samples were collected at the University Hospital Bonn. Informed consent was obtained from all patients and protocols were approved by the institutional review board of each hospital. Isolation of peripheral blood mononuclear cells (PBMCs) and single-cell suspensions was performed using Ficoll Paque Plus (Millipore Sigma) density gradient centrifugation. Serum was collected from each patient and donor and used for the isolation of RNA and quantification of cytokines. Before fluorescence-activated cell sorting (FACS) analysis, BALF samples were collected, washed and fixed with 4% paraformaldehyde, and lysis of red blood cells with ammonium-chloride-potassium (ACK) lysing buffer was performed for blood samples according to the manufacturer's instructions.

Multiplex quantification of cytokines, hormones and fibrosis markers
Concentrations of cytokines, hormones, pro-fibrotic proteins, total protein and collagen were measured in the serum and in BALF samples from patients by multiplex immunoassay analysis (Luminex (R&D) using the Luminex xPONENT software (Thermo Fisher Scientific) and Legendplex (BioLegend)), bicinchoninic acid assay (total protein) or Sircol soluble collagen assay (collagen) according to the manufacturer's instructions.

Histology
The left lung lobe was fixed in 10% formaldehyde solution and embedded into paraffin blocks. Sections were stained with picrosirius red to assess collagen deposition using the ZEN 3.1 blue edition (ZEISS). The area of collagen fibres as a function of their colour hue was quantified using polarized light microscopy as previously described 48 . According to a previously published protocol 49 , an adapted algorithm was created with MATLAB software (MathWorks). The algorithm transformed all images from RGB to the HSV colour model. The red colour component was separated as a function of 2-9 and 230-256. Collagen content was quantified as the area of red of each image. The green channel of RGB images from picrosirius-red-stained lung sections was binarized with MATLAB software as previously reported 50 to quantify the infiltrates. Black pixels were counted, and the density was shown as pixel count per image. Calculation of the lung injury score was determined as previously described 51,52 . In brief, two blinded investigators evaluated the sum of histological evidence of leukocyte influx in both alveolar and interstitial spaces, proteinaceous debris, formation of hyaline membranes and alveolar septal thickening, then weighted the variables according to their relevance in reflecting the lung damage. Subsequently, variables were normalized to four evaluated fields of haematoxylin and eosin (H&E)-stained (Sigma-Aldrich) lung sections of mice infected with SARS-CoV-2 or influenza A/Puerto Rico/8/1934 virus.

RNA isolation, library construction, sequencing and analysis
After the isolation of RNA, 100 ng total RNA was used for library preparation using the QuantSeq 3′ mRNA-Seq Library Prep kit (Lexogen) according to the manufacturer's instructions. Afterwards, samples were subjected to sequencing on a NovaSeq 6000 sequencer (Illumina) with 1 × 100 bp single-end reads and a mean coverage of 10 million raw reads per sample. Data were analysed by Qlucore software (https:// qlucore.com/).

Infection with influenza A virus
C57BL/6 mice were anaesthetized with isoflurane and infected intranasally with 5 × 10 3 plaque-forming units (PFU) of influenza A/Puerto Rico/8/1934 virus in 50 µl PBS on day 0. Mice were euthanized on day 4, 7 or 10 after infection, BALF was collected and the lungs were removed for further analysis. Lung homogenate was obtained by meshing diced lung fragments through a 40-µm cell strainer, and the cell-free supernatant was stored at −80 °C for cytokine analysis. A piece of the lung and the liver tissues were placed in RNA later buffer and stored at −80 °C for subsequent RNA extraction and qRT-PCR analysis.

Infection with SARS-CoV-2
K18-hACE2 mice were anaesthetized with ketamine-xylazine and infected intranasally with 60 PFU SARS-CoV-2 (clinical isolate of wild-type strain) in 30 µl PBS on day 0. Mice reached the clinical end-point after the loss of 25% or of 20% of their initial starting weight for more than two consecutive days. Mice were euthanized on day 8 after infection, BALF was collected and the lungs were removed for further analysis. A piece of the lung and the liver tissues were placed in Trizol and stored at −80 °C for subsequent RNA extraction and qRT-PCR analysis.

Preparation of cell suspensions from lung tissue
Lung tissues were diced and digested with 0.25 mg ml −1 Liberase TL (Roche) and 1 mg ml −1 DNase I (Sigma) at 37 °C for 1 h. Isolated lung cells were further purified using a 37.5% Percoll gradient, followed by lysis of red blood cells with ACK lysing buffer.

Measurement of glucose and ketone bodies
Concentrations of glucose and BHB in the plasma and lung homogenate were measured by using an ACCU-CHECK Aviva (Roche) and a FreeStyle Precicion Neo H instrument (Abbott), respectively.

In vitro tracing of 13 C-labelled glucose and BHB
Splenic mouse CD4 + T cells were activated in culture for three days. Cells were washed and incubated for 3 h with 5 mM of C 13 -labelled glucose at 37 °C in glucose-free medium or for 12 h with 5 mM of C 13 -labelled BHB. After culture, around 2 million cells were washed with calciumand magnesium-free Hanks' balanced salt solution (HBSS). Liquid chromatography-mass spectrometry detection included one-step organic solvent extraction of cells, and separation on a 1 mm × 150-mm HILIC specific column in a 35-min cycle. Isotope enrichment of targeted metabolites was corrected for natural abundance and reported as a ratio of M, M+1, M+2, M+3 and so on (MassHunter Profinder software). The extraction, run and final analyses were done by Creative Proteomics.
In vivo and ex vivo tracing of 13 C-labelled BHB C57BL/6 mice were anaesthetized with isoflurane and infected intranasally with 5 × 10 3 PFU of IAV in 50 µl PBS on day 0. For the in vivo tracing experiment, 300 mM C 13 -labelled BHB (Eurisotop) was injected intraperitoneally for 20 min on day 7 before euthanizing the mice. Lung tissue was diced and digested with 0.25 mg ml −1 Liberase TL (Roche) and 1 mg ml −1 DNase I (Sigma) at 37 °C for 20 min. Isolated lung cells were further purified using a 28% Percoll gradient, followed by lysis of red blood cells with ACK lysing buffer. CD4 + T cells were purified using the magnetic negative selection kit (Mojosort mouse CD4 T cell isolation kit, BioLegend) following the manufacturer's instructions. For ex vivo tracing experiments, CD4 + T cells isolated from untreated mice were further cultured for 2 h in diluted medium with C 13 -labelled BHB. Purity and cell death was assessed by flow cytometry on a BD LSRFortessa and cells were pooled to a total of 1.5 × 10 6 cells per sample, washed with HBSS and resuspended in methanol. Analyses were performed by gas chromatography-mass spectrometry (GC-MS).

Sample preparation and GC-MS
Samples were prepared and processed as described previously 53 . Cell pellets (1.0 or 1.5 × 10 6 cells) were mixed with 400 or 600 µl of a methanol and water mixture (1:1; v/v) and 200 or 300 µl chloroform and subsequently vortexed for 20 min at 1.200 rpm at 4 °C on a thermomixer (Eppendorf) and centrifuged (Eppendorf 5415R) at 17,000g for 5 min at 4 °C. The upper polar phase (200 µl) was transferred into GC vials and evaporated to complete dryness at 4 °C in a vacuum centrifuge (Labconco Corporation) for at least 3 h. Samples were online derivatized and automatically prepared by a Gerstel MultiPurposeSampler. Derivatization was performed with 15 µl methoxyamine hydrochloride (Sigma-Aldrich) in pyridine (20 mg ml −1 ) at 55 °C for 30 min followed by 15 µl N-methyl-N-(tert-butyldimethylsilyl) trifluoroacetamide (Macherey Nagel) for 90 min at 55 °C. GC-MS measurements were performed on a combined set-up of a 7890B GC with a 5977B MSD (Agilent Technologies). A 30-m DB-35ms capillary column (inner diameter, 250 µm; film, 0.25 µm) and 5-m DuraGuard capillary in front of the analytical column (Agilent J&W GC Column) were used for the separation of metabolites. Samples (1 µl) were injected into the GC inlet at 270 °C and helium was used as a carrier gas (flow rate of 1 ml min −1 ). The GC oven temperature was held at 80 °C for 6 min and then increased at 6 °C per min until reaching 280 °C and held for 10 min. The electron ionization energy was set to 70 eV. The temperature of the MS source and the quadropole were set, respectively, at 230 °C and 150 °C. Full scan (70-800 m/z, 3.9 scans per second) and with a second injection, selective ion chromatograms were recorded for lactate (

Metabolic assays
For real-time measurement of the oxygen consumption rate (OCR) and extracellular acidification rate (ECAR), 2 × 10 5 in-vitro-polarized T H 1 cells were washed with Seahorse XF RPMI medium (pH 7.4) supplemented with 5 mM glucose (or without), 1 mM pyruvate, 2 mM glutamine, 100 µg ml −1 linoleic or oleic acid and 5 mM NaCl or BHB, respectively. Quadruplicates were seeded in poly-l-lysine (0.01%) pre-coated Seahorse XF96 Cell Culture Microplates and the plate was kept in a non-carbonated incubator for 30 min at 37 °C. Cells were analysed with an XF96 Extracellular Flux Analyzer using the Wave desktop software (Agilent). Three or more consecutive measurements were obtained under basal conditions followed by the addition of 1.5 µM oligomycin, which inhibits the mitochondrial ATP synthase; 1.5 µM FCCP (carbonyl cyanide 4-(trifluoromethoxy)phenylhydrazone), which uncouples ATP synthesis from oxygen consumption; and a combination of 0.5 µM rotenone and antimycin A, which inhibits the electron transport chain by blocking complex I and III, respectively. All chemicals used for these assays were obtained from Agilent. Spare respiratory capacity was calculated as the difference between the basal OCR and the maximal OCR after the addition of FCCP.

In vitro inhibitor treatment
To inhibit OXPHOS in human T cells, increasing concentrations of rotenone, antimycin A and oligomycin (10 nM, 100 nM and 1 µM) were used to block the activity of complex I, III and V of the respiratory chain, respectively.

Diet studies
Control diet AIN 93G (17.6% protein, 7.1% fat and 11% sugar) and ketogenic diet TD.130659 (15% protein, 72% fat and 2.4% sugar) were purchased from Ssniff. Mice were placed on ketogenic or control diets one week before infection with IAV and maintained on these experimental diets throughout the experimental study.

Supplementation with ketone ester
Ketone ester (d-β-hydroxybutyrate-(R)-1,3 butanediol monoester) was a gift from K. Clarke. Mice were supplemented with 20 mg ml −1 ketone ester in the drinking water from day 0 of infection with IAV or SARS-CoV-2 for the duration of the experimental study.
qRT-PCR RNA was extracted from purified T cells or whole BALF cells using Trizol (Thermo Fisher Scientific) and reverse-transcribed with the Rever-tAid Kit (Thermo Fisher Scientific) according to the manufacturer's instructions. RNA from whole lung or liver tissue was extracted using the Dynabeads mRNA direct kit (Thermo Fisher Scientific) according to the manufacturer's instructions. The cDNA served as a template for amplification of the genes of interest. For analysis of genes expressed, TaqMan probes for human IFNG, IFITM3, IFI27, IFI44L, IFIT1, MX1, ISG15 (SARS-CoV-2) (IDT) were used. Analysis of PB1 (IAV) transcripts was performed with a SYBR Green-based qRT-PCR assay using the following primers: forward: 5′-ACACAAGGCCGACAGACCTA-3′ and reverse: 5′-ATGCTGTTGCAGCAGGTTGG-3′ and Actb (QIAGEN; QT01136772) as the housekeeping gene. Target-gene expression was determined by QuantStudio Real-Time PCR software (Thermo Fisher Scientific) and calculated using the comparative method for relative quantification upon normalization to HPRT/Hprt or 18S gene expression. Analysis of PB1 (IAV) transcripts was performed with SYBR Green-based qPCR using the following primers: forward: 5′-ACACAAGGCCGACAGACCTA-3′ and reverse: 5′-ATGCTGTTGCAGCAGGTTGG-3′ and Actb (QIAGEN; QT01136772) as the housekeeping gene.

Reporting summary
Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability
Raw RNA-seq files have been deposited in the GEO database under the accession number GSE207077. The metabolomic data were previously published 36 and can be obtained from Mendeley Data at https://doi. org/10.17632/tzydswhhb5.5. All other data generated or analysed in this study are included in the published Article or its Supplementary Information). Source data are provided with this paper.