Petty made his first NFL start in place of an injured Ryan Fitzpatrick, but couldn't get much going against the Rams defense.
After getting the ball with 2:55 remaining and down by three, Petty tried to lead the Jets (3-7) down the field. But on second-and-7 from the 42, Petty's pass to Quincy Enunwa was picked off by Ogletree and Enunwa tried to wrestle it away from the linebacker to no avail.
Greg Zuerlein kicked three field goals, including a go-ahead 34-yarder with 6:52 left, helping the Rams (4-5) snap a four-game losing streak and avoid their first five-game skid since weeks 9-13 last season.
The game featured 15 punts -- eight by the Jets and seven by the Rams -- as neither offense were the models of efficiency or excitement. New York finished with 296 yards of total offense, while the Rams had 280.
Petty, a fourth-round draft pick out of Baylor last year, went 19 of 32 for 163 yards with a touchdown and the loss-sealing interception.
Fitzpatrick was listed as questionable with a sprained left knee , suffered last weekend at Miami. Coach Todd Bowles said throughout the week that Fitzpatrick would remain the starter for Sunday's game -- as long as he was healthy enough to play.
After the game, Bowles said Fitzpatrick wasn't "completely healthy." The two split first-team snaps during practice all week.
Fitzpatrick was active for the game and served as Petty's backup, while rookie Christian Hackenberg was inactive. Bowles would not commit to who his starter would be in the Jets' next game against New England in two weeks.
While Rams fans have been clamoring for No. 1 overall pick Jared Goff to play, Case Keenum went a ho-hum 17 of 30 for 165 yards, but had no turnovers after throwing eight interceptions in his previous four games.
Petty drove the Jets 99 yards on the Jets' second possession, finishing with his first NFL TD pass with a little razzle-dazzle on a toss to Brandon Marshall, who flipped it to Bilal Powell for a 4-yard score.
Nick Folk was wide left on the extra point, his second miss of the season, leaving New York with a 6-3 lead early in the second quarter.
The drive was helped by a perfectly placed 52-yard pass to Robby Anderson down the left sideline and a 28-yard run by Matt Forte that put the ball at the Rams 5. Forte finished with 98 yards on 20 carries.
Zuerlein gave the Rams a 3-0 lead on their opening drive with a 20-yard field goal, but Los Angeles could have had more. After a 25-yard catch by Kenny Britt and a 24-yard run by Benny Cunningham, the Rams had first-and-goal on the Jets 1 but couldn't punch it in.
Zuerlein tied it at 6 with 20 seconds left in the third quarter with a 38-yard field goal.
Petty misfired on a long pass on third-and-14 from the Rams 32 that could've been an easy touchdown in the closing minute of the first half, slightly overthrowing Anderson, who was wide open but had to reach high as the ball tipped off his hand.
GURLEY STILL GROUNDED
Todd Gurley, last season's Offensive Rookie of Year, still has yet to run for 100 yards in a game this season after rushing for 125 or more five times last season. He finished with 64 yards on 21 carries. Gurley's longest run of the season, 21 yards in the fourth quarter, was wiped out by Greg Robinson's holding penalty.
With the Rams pinned at their 17 on fourth-and-1 early in the fourth quarter, Johnny Hekker blasted a 78-yard punt that had returner Jalin Marshall fielding as if he were catching a pass. After a 10-yard return by Marshall, the Jets had the ball at their 15 -- and went three-and-out. It was the fourth-longest punt in franchise history.
Rams: vs. Miami next Sunday.
Jets: bye week. Next game vs. New England, Nov. 27.
For more NFL coverage: http://www.pro32.ap.org and http://www.twitter.com/AP-NFL
Chiefs could give Mahomes more money down the road
Desmond Howard explains that the Chiefs could restructure Patrick Mahomes' 10-year extension in the future to assure Mahomes is paid the market value at that time.
Cowboys' Dontari Poe likely to kneel, hopes Jerry Jones will express support for players
The Cowboys' Dontari Poe told Bleacher Report that he is leaning toward kneeling during the national anthem this season, and he hopes Jerry Jones will end his silence on racial injustice.
Ravens' Lamar Jackson to hold social event in Florida amid coronavirus concern
Ravens QB Lamar Jackson will hold his annual "Funday with LJ" event on Saturday and Sunday in his hometown of Pompano Beach, where social gatherings in groups of more than 10 people are currently not allowed during the pandemic.
Eagles' DeSean Jackson says he doesn't hate Jewish community after posting anti-Semitic messages
Eagles receiver DeSean Jackson featured an anti-Semitic quote on his social media feed that he attributed to Adolf Hitler and later said, "I have no hatred in my heart toward no one."
Should Travis Kelce or George Kittle be the NFL's top TE?
Jeremy Fowler examines the tight race between Travis Kelce and George Kittle for the top spot in tight end rankings among league insiders.
Ranking the NFL's best tight ends in 2020: Execs, players, coaches pick the top 10
No position sparked more debate about two players at the top than tight end. Here's how execs, coaches, players and other insiders rank the league's best.