We apply endoscopic ultrasound-guided fine needle aspiration biopsy to cytopathologically diagnose and sample nucleic acids from primary tumours regardless of the disease stage. 397 patients with proven pancreatic adenocarcinoma were included and followed up in a multicentre prospective study. DNA and mRNA were extracted from materials of primary tumours obtained by endoscopic ultrasound-guided fine needle aspiration biopsy and analysed using targeted deep sequencing and RNAseq respectively. The variant allele frequency of the KRAS mutation was used to evaluate the tumour cellularity, ranging from 15 to 20% in all cells, regardless of the tumour stage. The molecular profile of metastatic primary tumours significantly differed from other types of tumours, more frequently having TP53 mutations (p=0.0002), less frequently having RNF43 mutations, and possessing more basal-like mRNA component (p=0.001). Molecular markers associated with improved overall survival were: mutations in homologous recombination deficiency genes in patients who received first-line platinum-based chemotherapy (p=0.025) and wild-type TP53 gene in patients with locally advanced tumours who received radio-chemotherapy (p=0.01). The GemPred transcriptomic profile was associated with a significantly better overall survival in patients with locally advanced or metastatic pancreatic cancer who received a gemcitabine-based first-line treatment (p=0.019). The combination of genomic and transcriptomic analyses of primary pancreatic tumours enables us to distinguish metastatic tumours from other tumour types. Our molecular strategy may assist in predicting overall survival outcomes for platinum or gemcitabine-based chemotherapies, as well as radio-chemotherapy. Institut National Du Cancer (BCB INCa_7294), CHU of Toulouse, Inserm and Ligue Nationale Contre le Cancer (CIT program).