The Bárcenas Affair is a corruption scandal in Spain that affects the People’s Party (PP), one of the country‘s main political parties. Following revelations that Luis Bárcenas, who served as party treasurer and senator, held 48 million euros in Swiss bank accounts, extracts of handwritten accounts, the so-called “Bárcenas papers” (los papeles de Bárcenas) were published in the press. Those accounts allegedly indicate that the PP kept, for many years, a parallel bookkeeping system to record undeclared and illegal cash donations, and used them to pay bonuses to senior members of the party as well as for daily party expenses.
The documents cover the period from 1990 to 2009, and suggest that regular cash payments had been made from a slush fund. Those include payments of 25,000 euros ($34,000) a year, for eleven years, to the former Prime Minister, Mariano Rajoy, including, according to El Mundo, during three of the years that he served as minister in José María Aznar's government.
Other leading party figures allegedly involved in the scandal include former ministers Rodrigo Rato, (also a former director general of the IMF, and now serving time for a separate corruption case), Ángel Acebes, Federico Trillo, and former secretaries-general, who also served as ministers, Francisco Álvarez-Cascos, who allegedly received 421,693 euros between 1990 and 2004, Javier Arenas, who allegedly received 234,320 euros, and María Dolores de Cospedal, also Minister of Defence, the most senior party member summoned to date to appear before the investigating judge. and the President of the Senate, Pío García-Escudero 
On 1 August 2013, after “weeks of holding out against demands that he give some sort of explanation for the corruption and illegal funding scandal that has engulfed” his party, Rajoy was finally forced to address Spain's parliament by the threat of a motion of censure. While admitting to having handled the scandal badly, he denied taking illegal funds.
On 22 November 2013, the investigating judge released a writ where he claimed that circumstantial evidence existed that the PP had maintained a parallel accounting system to the official one it presented to the Audit Court.
The trial for the related Gürtel case began in 2016. The verdicts in the first part of the Gürtel case, reached in 2018, had implications for the "Caja B" case, which was was scheduled for trial later that year.
The Bárcenas affair broke out on 18 January 2013, when Spain's leading center-right daily, El Mundo, revealed that the PP treasurer, Luis Bárcenas had, until stepping down in 2009 after being named a defendant in the Gürtel political corruption case, used the slush fund to pay out monthly amounts, ranging from 5,000 to 15,000 euros, to leading members of the party.
On 31 January 2013, Spain’s leading center-left daily, El País, in turn published what became known as the "Bárcenas papers", which consist of facsimile excerpts from handwritten ledgers in Bárcenas’ hand.
Current senate president Pío García Escudero, later stated that one of the payments that figure in Bárcenas’ handwriting corresponded to a cash loan he had been given to repair damage to his home after a terrorist attack, and on 13 August 2013, Cristóbal Páez, a former PP finance manager, testified that he had received 12,000 euros in two payments in 2007 and 2008, as reflected in Bárcenas' handwritten notes.
At the end of June 2013, the investigating judge, Pablo Ruz, faced with the risk of a defendant with access to considerable offshore funds fleeing the country, ordered that Bárcenas be remanded in prison without bail, on charges of tax fraud and money-laundering.
On 7 July 2013, El Mundo published an exclusive interview between Bárcenas and its or-in-chief, Pedro J. Ramírez, in which the former admitted the authenticity of the so-called "Bárcenas papers", which he had initially denied out of loyalty to his party. He likewise admitted that both he and the previous party treasurer, Álvaro Lapuerta, had received cash donations from real estate agents and other businessmen in "bags, suitcases and briefcases" that were used as a slush fund.
Summonses to testify before the High Court were issued to the following people: