The 18-year-old girlfriend of Radouane Lakdim, the jihadi who killed four people in the south of France last week, has been placed under formal investigation for terrorist conspiracy, officials said Tuesday.

The probe was announced as France prepares a national memorial service Wednesday for a police officer killed in the standoff in Trèbes.

State prosecutor François Molins said the woman, currently in police custody and named in the media as Marine, had been on a watchlist for potential Islamist radicals, as had the gunman.

The woman converted to Islam two years earlier and yelled “Allahu Akbar” when she was arrested following the Friday attacks, he said.

While her phone contact with Lakdim ceased in January, Molins said, she is believed to have continued communications with him via encrypted apps.

Marine has denied any knowledge of the attacks, but Molins said she had posted online a Koranic verse saying “infidels were promised to hell” just a few hours before Lakdim began his killing spree.

French gendarmes carry a coffin draped in the national flag containing the body of their slain colleague Lieutenant-Colonel Arnaud Beltrame towards an aircraft on the tarmac at the airport in Carcassonne on March 27, 2018. (PASCAL PAVANI/AFP/Getty Images)

Lakdim, a 25-year-old Moroccan-born French citizen, was killed Friday when police stormed a supermarket in in the town of Trèbes where he had taken hostages.

The gunman’s rampage began hours earlier in the nearby city of Carcassonne, where he shot dead a man during a carjacking then shot and wounded a police officer before taking hostages.

Lakdim, who claimed allegiance to the Islamic State group, killed a butcher, an elderly shopper and a police officer in the supermarket siege, demanding the release of Salah Abdeslam, the prime suspect in the November 2015 Paris terror attacks, in exchange for the release of the hostages.

His final victim, gendarme Lt-Col Arnaud Beltrame, 44, was hailed as a hero after volunteering to swap places with a female hostage who Lakdim was using as a human shield.

On Wednesday he will be given a state send-off at a national memorial service in Paris, led by French President Emmanuel Macron. Beltrame’s coffin will be taken through Paris ahead of the service at Les Invalides, home to Napoleon's tomb, where Macron will deliver a eulogy. A minute’s silence will be observed and will be awarded France’s highest accolade, the Legion d'Honneur.

On Saturday, Macron praised Beltrame as a “hero” who had demonstrated “exceptional courage and selflessness” and deserved “the respect and admiration of the whole nation.” Beltrame’s mother, Nicole Beltrame, told French media that she was not surprised her son had placed himself in harm’s way.

“I know Arnaud: Loyal, altruistic, and, since he was small, working for other people, committed to the country,” she said.

French media reported Tuesday that in the weeks prior to the siege, Lakdim had been sent a letter requesting he attend a face-to-face meeting with agents from France's domestic intelligence agency DGSI. The attack was the latest in a string of jihadi attacks that have claimed the lives of more than 240 people across France since January 2015.