The LIRR hopes a grisly new ad campaign will stop impatient motorists from trying to cheat death by racing across the path of oncoming commuter trains.

Two TV commercials unveiled Monday show a computer-generated sports car getting slammed and sent airborne by a diesel locomotive after maneuvering around lowered safety gates at a railroad crossing.

“When you’re at a grade crossing with lowered gates, remember: It only takes a fraction of a second to make a very bad decision,” a narrator intones.

“Your life is worth the wait.”

The 15-second spots close with a graphic, real-life picture — shot by a Post photographer — of the incinerated wreck in which driver Blanca Maldonado, 52, and her dad, José Reyes, 73, were killed last January.

The engineer survived by fleeing the eastbound train’s cab moments before it burst into flames in Brentwood.

The “Wait for the Gate” public-service commercials, which are posted on YouTube, will air on Long Island cable TV, and there also will be radio, newspaper and billboard versions of the ads.

In addition, the LIRR also plans to promote the campaign through social media.

The ads were sparked by a recent surge in deaths at LIRR crossings.

Six people have been killed so far this year, already matching last year’s total, although one this year and three last year were suicides.

LIRR President Helena Williams called the commercials “the story of life and death in 15 seconds.”

”Sadly, it’s a scene that plays out too often,” Williams said. “We have addressed the crossing gate problem in public service announcements time and again over the years and felt it was time to raise our voice once more.”