The JBTZ trial or the JBTZ affair (Slovene: afera JBTZ), also known as the Ljubljana trial (ljubljanski proces) or the Trial against the Four (proces proti četverici) was a political trial held in a military court in Slovenia, then part of Yugoslavia in 1988. The defendants, Janez Janša, Ivan Borštner, David Tasić and Franci Zavrl, were sentenced to between six months' and four years' imprisonment for "betraying military secrets", after being involved in writing and publishing articles critical of the Yugoslav People's Army. The trial sparked great uproar in Slovenia, and was an important event for the organization and development of the liberal democratic opposition in the republic. The Committee for the Defence of Human Rights was founded on the same day of the arrest, which is generally considered as the beginning of the so-called Slovenian Spring.
 In the late 1980s, Slovenia embarked on a process of liberal democratic reform, which went unparalleled in the other five Yugoslav republics. The Slovenian communist leadership, under Milan Kučan, was allowing an ever-greater degree of freedom of the press. The magazine Mladina was taking advantage of this and became extremely popular in Slovenia, deliberately testing the borders of press freedom with news and satire breaking old taboos. In 1987 it started more and more frequently attacking the Yugoslav People's Army (JNA) and its leadership, for instance labeling the defense minister, Branko Mamula, a "merchant of death" for selling arms to famine-stricken Ethiopia. Many of the articles were written by the young defense expert Janez Janša, who soon became a particular irritant for the JNA leadership. As far as the JNA were concerned, Mladina was attacking the army, the main protector of Yugoslav unity, and hence attacking Yugoslavia itself. When they realized that the Slovene government were not going to crack down on Mladina, they decided to do so themselves.
 In 1988, Mladina got its hands on notes from a secret meeting of the central committee of the League of Communists of Yugoslavia, detailing plans for arrest of journalists and dissidents in Slovenia. Their possession of these documents gave the JNA the pretext it needed. Shortly after, on 31 May, Janša, another Mladina journalist, David Tasić, and a Slovene sergeant in the JNA, Ivan Borštner, were arrested. Later the editor of Mladina, Franci Zavrl, was also arrested. They were charged with betraying military secrets, a charge that would have to be tried in a military court. Thus the government of Slovenia had no involvement in the proceedings.
 The JNA was hoping to impose a level of control on Slovenia, and assert its authority in the republic. In the event however, the JBTZ trial, as it became known from the initials of the accused (Janša, Borštner, Tasić, Zavrl), was a complete failure for the JNA, and only served to alienate the Slovenes from Yugoslavia. Slovene public opinion rallied massively behind the four accused. A Committee for the defense of Human Rights was formed, and a petition drawn up in support of the four accused gathered 100,000 signatures. A demonstration on the central Congress Square of the Slovenian capital Ljubljana on 22 June was attended by at least 40,000 people. All protests passed off peacefully, giving the army no excuse to intervene.
 The trial was held in camera, and the nature of the documents the accused were supposed to have revealed was never officially made public, giving rise to a plethora of rumors, and to the widespread assumption that the whole trial was a frame-up to get even with Janša and Mladina. In addition, the Army made the decision to hold the trial in the Serbo-Croatian language rather than Slovenian, in spite of provisions in the Slovene republican constitution that all official business in Slovenia should be conducted in Slovenian . This further outraged Slovenian public opinion, to which the use of the Slovenian language was of great symbolic significance. The four accused were sentenced to between six months' and four years' imprisonment, and handed back to the Slovene authorities, which carried out the sentences in the mildest way possible. Zavrl later related: "I spent my days editing the magazine in my office and my nights in prison. On one occasion, when I was late getting back, I had to break into the prison over the wire!"
 The effect of the JBTZ trial was what James Gow and Cathie Carmichael calls the "homogenization" of Slovene politics: it gave all Slovenes, irrespective of political stance, something to agree on. The opposition, organized in the Committee for the Defense of Human Rights, was received by Janez Stanovnik, the communist president of Slovenia, who publicly expressed sympathy for their cause. The trial became an important catalyst for the organisation of political movements in Slovenia. It also gave added strength to the idea that Slovenia should seek a greater degree of independence from the Yugoslav central authorities, a development which ended with the declaration of complete independence on 25 June 1991. Janša took advantage of the publicity from the trial to become a known political figure, serving as the defense minister of Slovenia in 1990, and from 2004 to 2008, 2012 to 2013 and once again from 2020 as prime minister of independent Slovenia.
 On 31 May 2013, a plaque commemorating the 25th anniversary of the event was unveiled on the building where the military court was held, in a ceremony attended by Janša, Tasić, and Zavrl. The plaque and the building were vandalized with graffiti a few days later. The plaque was stolen on 4 July 2013 and the building was again vandalized with graffiti.