## 1 Introduction  
In the current information age, where data flow rapidly, the battle against fake news is crucial to maintain quality. Misinformation, particularly in political contexts, threatens public trust in the media and politics, affecting vital areas such as the economy, healthcare, and education. The need to detect and counteract misinformation has led to advances in Machine Learning (ML) for fake news detection. However, most research has focused on general news in English, leaving a significant gap in detecting political misinformation in Spanish [1, 2, 3, 4, 5]. Recent breakthroughs in Deep Learning (DL), particularly with Transformer models like BERT [6], have demonstrated exceptional performance in natural language processing (NLP) tasks, including text classification for fake news detection [7, 8, 9, 10]. Transformer models in NLP tasks operate through two key phases: pre-training and fine-tuning. During pre-training, the model is exposed to large amounts of unlabeled text, building a foundational understanding of language through techniques like word masking and Next Sentence Prediction (NSP). This phase enables broad language comprehension. Fine-tuning, on the other hand, adapts the model for specific tasks using a smaller, labeled dataset. Pre-training imparts general linguistic knowledge, while fine-tuning refines the model for task-specific performance, making it highly effective for various NLP tasks. Transformer models, with their attention mechanism [11], are highly effective at understanding context and word relationships, making them well suited for detecting subtle patterns in fake news. Their ability to grasp nuances is critical for tasks like fake news detection. However, a major challenge in identifying political fake news in Spanish is the limited availability of robust datasets. Existing Spanish datasets, such as those from Kaggle, are often small and fail to cover the broad range of political issues, includingeconomic, healthcare, and education matters [12; 13; 14]. This lack of comprehensive data continues to be a significant obstacle in political fake news detection in Spanish. This research presents a comprehensive solution to address these challenges. We introduce an approach used to autonomously generate a dataset of 57,231 political news articles in Spanish (46,000 used for training and 11,231 for testing). Many of these news articles are gathered from reputable sources through web scraping and are also generated using information released by Spain's National Institute of Statistics (INE) (the acronym INE refers to the Instituto Nacional de Estadistica in Spanish), an authoritative body responsible for the collection, analysis, and distribution of official statistical data within the country. Our dataset greatly benefits from the availability of reliable information provided by the INE, encompassing demographic metrics, economic indicators, and statistics related to health and education. These data serve as both a robust source and an essential context for the detection of political fake news in the Spanish language. Due to the difficulties in finding trustworthy fake news samples, the dataset comprises around 28,000 fake news articles acquired through two methods: (i) employing generative models developed by OpenAI and (ii) creating fake news articles by automatically modifying specific details in real news, such as dates, statistics, and the identities of political figures, using Python libraries and scripts to falsify their content. The main contribution of our paper can be summarized as follows:  
* Creation of an extensive dataset of Spanish political news, automatically collected from reliable sources and enriched with generative artificial intelligence techniques. * Fine-tuning and evaluation of Transformer models, including BERT and its optimizations, for political fake news detection.