The Bastille Day terrorist took these selfies, flashing an evil smirk and flipping the bird inside the rental truck he used to fatally run down 84 people in Nice.

ISIS-inspired Mohamed Lahouaiej Bouhlel, 31, snapped a smiling photo of himself and an unidentified friend standing in front of the 19-ton truck just three days before he used it to barrel into crowds of people enjoying fireworks along the Promenade des Anglais.

Another selfie showed the Tunisian-born murderer gazing into his cellphone camera while giving the finger as he sat behind the wheel of the truck with a pal next to him.

The image eerily foreshadowed French police fatally shooting Bouhlel in the driver’s seat of the truck when he came to a stop after a 1.2-mile rampage.

Ten children were among the 84 killed, and another 202 people were injured.

The photos were published online Tuesday by The Sun newspaper. The killer also took a selfie in the truck moments before the murderous attack. He sent the photo to family members in Tunisia.

French investigators on Monday revealed that Bouhlel was a bisexual drug addict after they found videos and photos of his male and female sexual encounters on his phone along with pictures of him smoking narcotics and boozing, according to news reports. One lover was a 73-year-old male retiree who was questioned Tuesday by French police.

The retiree has not been publicly named.

Bouhlel kept his bisexuality secret — similar to Florida terrorist Omar Mateen, 29, who fatally shot 49 people in the gay Pulse nightclub in Orlando on June 12 before being killed by police.

Bouhlel’s uncle has told several media outlets that his nephew was indoctrinated about two weeks ago by an Algerian member of ISIS.

The uncle said Bouhlel was easy prey for ISIS because he was emotionally vulnerable after he separated from his wife and three children.

So far, French investigators have yet to make a connection between Bouhlel and the terror group — which has claimed responsibility for the Nice attack.

Investigators have used the evidence on Bouhlel’s phone to arrest seven suspects who they believe may have helped the terrorist carry out the attack.