Beltrame was rushed to the hospital after the terrorist shot him and was in critical condition. Just hours before dying, he and his partner Marielle were married, according to the publication Le Monde.
A priest performed the wedding ceremony right inside the intensive care unit on Friday night. By Saturday morning, Beltrame had passed away.
The couple had a civil marriage service last year and was planning to have a church wedding this summer.
A series of attacks hit Trebes on Friday when a 26-year-old Moroccan national, Redouane Lakdim, who was living in Carcassonne and reportedly obtained French citizenship in 2015, hijacked a car, wounding the driver and killing the passenger, drove to Trebes where he took people hostage at a supermarket.
Some of the hostages managed to leave the supermarket before the police arrived.
Beltrame, who had arrived at the site of the incident, swapped places with a female hostage. Lakdim opened fire on the officer, who suffered serious wounds. The police later stormed the building of the supermarket and shot down the assailant.
French President Emmanuel Macron described the attack as an act of "Islamic terrorism," while noting that the claims by the Islamic State* terrorist group of being behind the attacks had not been verified so far.
*Islamic State is a terror organization also known as Daesh, IS, ISIS or ISIL and banned in Russia and many countries around the world.