Children at Great Barford Lower School took part in the national Big Pedal scheme.
They kept a record of how many pupils cycled to school and they compared this to other schools around the country.
Amanda Meadows from the school office said: “We came 2nd in Bedford Borough and 526th in the country out of 1,100 – and we are quite a small school.
“Doctor Bike came and checked the safety of our bikes and two police officers, both called PC Jones, came and protected the bikes with security elements.
“And they did an outside assembly with a zebra crossing to show the children how to be safe.”