Following a decade of civil conflict, Libya today has a provisional government and is in the process of establishing a permanent one. The constitutional declaration of the interim government, currently the supreme law of the land, stipulates that Islam will be Libya's state religion. Under the most recent penal code, blasphemy against Islam specifically is punishable with imprisonment.
Apostates, on the other hand, can lose their marriages and inheritance rights by the structure of Libyan personal status law, which, in the realm of family matters, subjects Muslims to religious law. In addition, some courts continue to issue death sentences for apostasy despite its status as a capital offense being unclear due to the political upheaval of the recent decade.
The Islamization of Libya began when Muslims conquered the lands that today constitute the country in the seventh century. From then on, the region's political character was decidedly Islamic, passing through the hands of several explicitly Islamic caliphates and dynasties, including the Umayyads and Abbasids. Finally, the Ottoman Empire conquered most of its coastal lands (where the bulk of the habitable land in the current country exists) in the sixteenth century.
In the early twentieth century, the Italians colonized the lands that encompass Libya, though Libya was able to declare its independence in 1947 after Italy lost its hold on the lands as a result of the Axis loss in World War II. The Libyan penal code of 1953, enacted after independence, set forth the country's blasphemy law, punishing insults to Islam with up to two years in prison.
However, the current status of the penal code is today in flux, as the 2010s were a bloody decade of civil conflict in Libya following the overthrow of its previous government headed by Muammar Gaddafi. Currently, the country has a provisional government and is in the process of establishing a permanent one, after which existing legislation and its foundations may change. The interim constitutional declaration, however, establishes Islam as the state religion, and so legislation that penalizes blasphemy is likely to remain in some form. As well, apostasy continues to be punished with death sentences in some courts, despite the legal status of the "offense" being murky.