ST. LOUIS — Todd Gurley led a revived St. Louis offense that got rolling in the second half under new coordinator Rob Boras.

Trumaine Johnson had an even bigger day, scoring on an interception return and shutting down Calvin Johnson.

Gurley ran for 140 yards and two second-half touchdowns, and the Rams ended a five-game losing streak with a 21-14 victory over the Detroit Lions on Sunday.

Johnson’s 58-yard return was the only score in the first half, plus he did most of the work holding Johnson to a late 16-yard catch. Aaron Donald had three sacks of Matthew Stafford to further boost a defense that had sagged in recent weeks.

Golden Tate caught two touchdown passes for Detroit, which didn’t have much to show for extra days off to regroup from a game-ending TD pass by the Packers on Dec. 3.

Turnout was light on “fan appreciation day” at the Edward Jones Dome for what could be the final Sunday home game for the franchise in St. Louis (5-8), with 51,202 tickets distributed but the 66,000-capacity stadium half-filled at best. Rams owner Stan Kroenke wants to move the team to Los Angeles after this season and there is one remaining home game, on Thursday against Tampa Bay.

advertisement | advertise on newsday

Tate’s 2-yard catch shaved the Lions’ deficit to a touchdown with 2:05 left, the play after Johnson stopped his drought with a 16-yard reception. The Lions (4-9) recovered an onside kick after Bradley Marquez bobbled it, but turned it over on downs at the St. Louis 46.

Gurley averaged just 42.7 yards for the previous four games behind an injury-riddled line largely populated by rookies and had just 13 yards on seven carries at the half. Besides scoring on runs on 15 and 5 yards, he had carries of 49 and 21 yards after the break.

Boras replaced Frank Cignetti, who was fired on Monday, and called plays for the first time since 2003 when he was at UNLV.

The Rams looked beatable in the secondary with top cornerback Janoris Jenkins out with a concussion and safety T.J. McDonald sidelined for the season due to a shoulder injury. Trumaine Johnson returned after missing the previous two games and did most of the work solo on Johnson.

On the interception return, he stepped in front of an underthrown pass intended for Johnson and patiently waited for blocks the last 20 to 30 yards before ending St. Louis’ seven-quarter touchdown drought. Stafford had gone more than three games between interceptions.