Two moms and their three babies narrowly avoided tragedy yesterday when their car crashed on the Staten Island Expressway.

Rachel Boyer, 23, of Lakewood, N.J., was driving with her two boys, ages 2 years and 3 months, and a neighbor and her 1 1/2-year-old girl, when she swerved and hit a guardrail, police said.

“A cop car was hiding to clock speeds and five cars ahead of me stopped short. I didn’t want to hit anyone so I changed lanes and instead hit the guardrail,” said a shaken Boyer.

The moms and kids were rushed to Staten Island University Hospital but quickly given the all-clear by medics.

“I want the police to know it’s dangerous. The cop was there to stop speeders, but instead of making it safe, the cop was endangering our lives because the cars put on their breaks and that causes pileups,” she said.

Police acknowledged doing spot speed checks.

A few hours later in Staten Island, a firetruck collided with a limousine at Targee and Steuben streets in Emerson Hill at 9:29 p.m.

Three firemen suffered minor injuries, as did an occupant of the limo.