It takes solid and consistent play to thrive in the NFL. In today’s game, it pretty much requires a standout quarterback. And a little bit of good luck never hurts, either.

The Green Bay Packers got some of that good fortune Monday night at Lambeau Field thanks to some key (and seemingly erroneous) calls by the officials that went their way. They also hung tough, kept coming back, patched together their wide receiver corps, mixed in just enough well-timed quarterbacking magic by Aaron Rodgers and beat the Detroit Lions, 23-22, on a walk-off field goal.

Put all of that together, and the Packers somehow managed to improve to 5-1 and stay atop the NFL’s most rugged division.

“It feels good to be 5-1 right now,” Rodgers told ESPN afterward.

The Packers stayed a game ahead of the second-place Minnesota Vikings, who are 4-2, in the NFC North. It’s the league’s only division in which all four teams are at .500 or above, with the third-place Chicago Bears at 3-2 and the last-place Lions at 2-2-1. The Lions would have been in first place had they won Monday. That’s how competitive the division is.

Kicker Mason Crosby’s 23-yard field goal as time expired won it for the Packers, who overcame deficits of 13-0 and 22-13. They took nearly seven minutes off the clock on their winning field goal drive.

The Lions, out of timeouts with the Packers well into field goal range, attempted to allow the Packers to score a touchdown near the game’s end to get the ball back with a chance to win. But Green Bay running back Jamaal Williams wouldn’t allow it, going to the turf on his own with a wise sit-down maneuver.

“It didn’t really feel like a win until about the end, I think,” Rodgers said. “We battled. We made some mistakes. We turned the ball over a bunch. But there’s a lot of resolve on this team.”

The Packers’ winning drive was extended by a controversial penalty on Detroit’s Trey Flowers for illegal use of hands. It was the second such penalty of the night against Flowers, and neither call appeared to be correct. The Lions also were victimized down the stretch by a potential defensive pass interference against the Packers gong uncalled. In an NFL season in which so much has been about the officiating, this outcome of this game was plenty about the officiating.

“I think the Lions are going to feel like they played better than the Packers tonight and the officials took this one away,” ESPN analyst Booger McFarland on the network’s postgame show.

Lions quarterback Matthew Stafford and Coach Matt Patricia took the calls relatively in stride.

“We just go out there and play,” Stafford said at his postgame news conference. “We’re not playing the officials. We’re playing the Packers. The calls are gonna go your way or go against you. I have no clue which ones were close or not. But that’s the way it goes.”

Patricia said of the Lions’ penalties: “We just can’t have them. We know how dangerous they are and we know how detrimental those penalties are.”

The Lions, seeking what would have been their fourth victory in five years at Lambeau, got off to a fast start as Stafford threw for 219 yards in the first half, 168 of them in the first quarter.

Tailback Kerryon Johnson had a one-yard touchdown run on fourth down, producing loud boos by a Green Bay crowd that thought the Packers’ defense had stopped Johnson shy of the goal line. One official stationed on the goal line signaled touchdown. Another seemed to indicate that Johnson hadn’t gotten to the end zone. The officials conferred and ruled touchdown, and there wasn’t a sufficiently clear view on replay to dispute that or overturn the call.

But the Lions otherwise had to settle for field goals, as kicker Matt Prater connected five times on the night. The failure to get touchdowns instead of field goals doomed the Lions.

The Packers came back from the early 13-0 deficit to tie the game at 13 in the third quarter. They fell back behind by nine points, at 22-13 early in the fourth quarter, but drew within 22-20 and then put together the final drive.

The Packers’ stumbles and bumbles included dropped passes, lost fumbles by tailback Aaron Jones and punt returner Darrius Shepherd, and a bobbled pass by Shepherd while playing wide receiver that led to a Lions interception. Their first-half touchdown, scored by Williams on a tap pass by Rodgers, capped a drive on which Jones and tight end Jimmy Graham dropped would-be touchdown passes. Very little came easily on this evening for the Packers.

But Rodgers did his thing. He threw a pair of touchdown passes, the second of which came on a gorgeous throw to Allen Lazard. The young wideout, who was undrafted out of Iowa State and spent most of last season on the Jacksonville Jaguars’ practice squad, made a terrific catch for the 35-yard score that made it a 22-20 game in the fourth quarter.

The Packers were without their top wide receiver, Davante Adams, who was out with a toe injury. Marquez Valdes-Scantling was hurt while blocking in the first half but returned to the field in the second half. Geronimo Allision exited with a chest injury and a possible concussion after absorbing a helmet-to-helmet hit by Detroit safety Tracy Walker. There was a penalty called on Walker on the play for an illegal hit to the head of a defenseless receiver, even if Walker did appear to be making a play on the football and not intending to deliver such a hit.

Green Bay was shorthanded at wide receiver and needed someone to fill in and make a play. That someone, as it turned out, was Lazard.

“We started putting things together,” Rodgers told ESPN. “With Davante out and then Geronimo goes down, we finally get Allen in the game and that’s what he does. He’s been doing it in practice a bunch. It’s good to see him finally get an opportunity to make some big plays.”

In-game updates

4th Quarter

Packers get back in it: The Packers have gotten back into the game again, this time with a dazzling 35-yard touchdown pass from Aaron Rodgers to undrafted rookie wide receiver Allen Lazard. Rodgers dropped a gorgeous throw over Lions cornerback Justin Coleman, who’d broken up a pass to Lazard on the previous play and had good coverage again, and Lazard made a terrific catch. Green Bay is shorthanded at wide receiver and needs someone to make plays. That someone, this time, was Lazard. (Lions 22, Packers 20 with 9:03 left in the 4th quarter)

Prater connects again: Make it five field goals for Lions kicker Matt Prater. This one comes from 54 yards as the Lions cash in on the deflected-pass interception. The Lions were left kicking the field goal after the Packers won a replay challenge turning a third-down completion by Detroit into an incompletion. (Lions 22, Packers 13 with 12:17 left in the 4th quarter)

Dropped pass gives Lions key pick: It’s a bad night for Packers wide receiver Darrius Shepherd. He fumbled earlier on a punt return, and he just cost the Packers an interception and a chance to take the lead with a dropped pass. Shepherd was open at the Detroit 2-yard line but slipped and had Aaron Rodgers’s pass bounce off his hands and face mask. The ball was grabbed on the carom by Detroit’s Justin Coleman for an interception charged, unfairly, to Rodgers, and Coleman raced 55 yards the other way to give the Lions possession in Green Bay territory. The Packers’ scoring chance had been set up by a 46-yard completion from Rodgers to wideout Marquez Valdes-Scantling on the opening play of the fourth quarter. (Lions 19, Packers 13 with 13:09 left in the 4th quarter)

3rd Quarter

Field goal (what else?) for Lions: Make it four field goals for Lions kicker Matt Prater. He hits from 51 yards away this time to extend Detroit’s lead. (Lions 19, Packers 13 with 3:27 left in the 3rd quarter)

Lions retake lead on field goal after fumble: Kicker Matt Prater connected on his third field goal of the night, a 41-yarder, to put Detroit back in front. But if the Lions end up losing this game, they’ll lament that they’ve gotten field goals instead of touchdowns on so many scoring chances. Prater’s field goal was all the Lions could manage after recovering a fumble by Packers punt returner Darrius Shepherd at the Green Bay 25-yard line. (Lions 16, Packers 13 with 9:01 left in the 3rd quarter)

Packers draw even: Kicker Mason Crosby’s 48-yard field goal gives the Packers 13 straight points and ties the game. Green Bay has the momentum but must deal with the attrition of its wide receiver corps. Geronimo Allison was injured on a helmet-to-helmet hit by Lions safety Tracy Walker on an incompletion on the field goal drive. Allison was able to walk off the field on his own and was taken to the medical tent on the Packers’ sideline. He later left the field and was taken to the locker room, presumably to be evaluated for a possible concussion. Walker was penalized on the play for an illegal hit to the head of a defenseless player. He did appear to be going for the ball rather than attempting to deliver a hit on the play. Wideout Marquez Valdes-Scantling returned to the game after being injured while blocking in the first half. (Lions 13, Packers 13 with 12:35 left in the 3rd quarter)

Halftime at Lambeau Field: The Lions lead, 13-10, at halftime in Green Bay after the Packers got a 37-yard field goal by kicker Mason Crosby seven seconds before the intermission. The Packers had a first down at the Detroit 10-yard line but were pushed back by a holding penalty. Still, they have to feel fortunate to be so close after facing a 13-0 deficit that could have been larger.

Matthew Stafford had 219 first-half passing yards for the Lions. He threw for 168 yards in the first quarter alone, with completions of 66 and 58 yards on the Lions’ first two drives. But Detroit settled for two field goals among three early scoring opportunities. The Lions’ touchdown came on a one-yard run by tailback Kerryon Johnson on a fourth-and-goal play after which the Lambeau Field crowd booed loudly, believing that Johnson had been stopped shy of the goal line by the Green Bay defense.

The Packers struggled to get going. Tailback Aaron Jones lost a fumble and dropped what should have been an easy touchdown catch. Tight Jimmy Graham dropped a potential touchdown catch on the same drive as Jones’s drop. But the Lions extended that Packers’ drive with two penalties, one of them for having too many men on the field as Green Bay lined up for a field-goal attempt. Running back Jamaal Williams scored a five-yard touchdown on a tap pass by Aaron Rodgers to finish that eventful drive, then had a 45-yard run to set up Crosby’s field goal.

One ominous development for the Packers came when wide receiver Marquez Valdes-Scantling was injured while blocking on a running play late in the half. Green Bay already is shorthanded at receiver with Davante Adams out with a toe injury. (Lions 13, Packers 10 at halftime)

2nd Quarter

Packers get on board: The Packers, somehow, are back in this game. They’ve been dominated so far by the Lions. They dropped two would-be touchdown passes before finally scoring a touchdown on this 14-play drive. But the Lions certainly did their part to get Green Bay back in contention with two key penalties to extend the drive. The Lions were called for defensive holding following a third-down incompletion thrown by Aaron Rodgers, then were penalized for having too many players on the field as the Packers lined up for a field goal.

Green Bay took advantage with a five-yard touchdown by running back Jamaal Williams on a forward tap pass by Rodgers. Earlier on the drive, tailback Aaron Jones dropped what should have been a 33-yard touchdown pass by Rodgers on a play on which he was wide open and Rodgers made an on-target throw. Tight end Jimmy Graham dropped what would have been a more difficult touchdown catch later in the drive. No matter. The Packers are within six points. (Lions 13, Packers 7 with 7:31 left in the 2nd quarter)

Lions get another FG: The Lions added to their lead but could end regretting the field goals they’ve gotten instead of touchdowns on two of their first-half opportunities. They reached the Green Bay 2-yard line but couldn’t get into the end zone. Tight end T.J. Hockenson nearly made a touchdown catch on a second-down lob from Matthew Stafford on a fade pattern. But Hockenson couldn’t hold onto the football as he landed on the ground. After a delay-of-game penalty on the Lions, an offside penalty on the Packers and a third-down incompletion thrown by Stafford, Detroit got a 22-yard field goal by kicker Matt Prater. It’s very early in the second quarter and Stafford already has 194 passing yards. (Lions 13, Packers 0 with 13:28 left in the 2nd quarter)

1st Quarter

Packers lose fumble: This is not going well so far for the Packers. They had a decent drive going but tailback Aaron Jones lost a fumble. The Lions take possession and will try to add to their lead. (Lions 10, Packers 0 with 3:30 left in the 1st quarter)

Lions get fourth-down TD (maybe): Matthew Stafford made it two long completions in two Detroit possessions, and this time the Lions cashed in with a one-yard touchdown run by tailback Kerryon Johnson on fourth and goal. The crowd at Lambeau Field booed the touchdown ruling loudly, believing that the Green Bay defense stopped Johnson short of the goal line on the fourth-down play. It was very close. One official along the goal line signaled touchdown, while another official on the other side of the play seemed to indicate that Johnson had been stopped shy of the end zone. The officials, after a brief conference, signaled touchdown, and there was no reversal on replay. It was not clear with the pileup of bodies whether Johnson managed to get the football to the goal line or not. Earlier, Stafford connected on a 58-yard pass to wideout Marvin Hall. Stafford has completions of 66 and 58 yards already and the Lions have a quick 10-point lead. (Lions 10, Packers 0 with 6:35 left in the 1st quarter)

Early trickery by Lions: The Lions were extremely aggressive — and extremely successful — with a trick play on their opening snap. On a flea flicker, Matthew Stafford connected with wide receiver Kenny Golladay for a 66-yard pass play to the Green Bay 11-yard line. It wasn’t as dazzling from there, as the Lions settled for a 26-yard field goal by kicker Matt Prater. (Lions 3, Packers 0 with 12:41 left in the 1st quarter)

Preview

The NFC North is shaping up as a rugged division and two of its contenders, the Green Bay Packers and Detroit Lions, square off Monday night at Lambeau Field.

The Packers have put themselves in the conversation about the NFC’s best team with a fast start under their first-year head coach, Matt LaFleur. They’ll try to improve their record to 5-1, which would join the New Orleans Saints and Seattle Seahawks at a half-game behind the 5-0 San Francisco 49ers in the conference standings.

LaFleur was hired to replace Mike McCarthy because he’s a young, would-be offensive mastermind in the mold of his former Los Angeles Rams boss, Sean McVay. But so far, the Packers are winning not because LaFleur has gotten the most out of quarterback Aaron Rodgers and the offense. They’re winning because they’ve been a better all-around team and not so heavily reliant upon Rodgers to mask deficiencies in other areas.

Lions at Packers

When: Monday at 8:15 p.m. Eastern

Where: Lambeau Field in Green Bay, Wis.

TV: ESPN

Streaming: fuboTV

LaFleur retained defensive coordinator Mike Pettine, the former head coach of the Cleveland Browns, and Pettine has overseen the league’s eighth-ranked scoring defense. The Packers have 15 sacks in five games, led by 5.5 by Preston Smith and five by fellow newcomer Za’Darius Smith. The defense might have to lead the way again Monday, since Rodgers will be without wide receiver Davante Adams, who has been ruled out because of a toe injury. Rodgers had only four completions to wide receivers when the Packers won at Dallas eight days ago.

The Lions have played surprisingly well, with a record of 2-1-1. They’re coming off a bye week that followed their first loss of the season, a 34-30 defeat Sept. 29 to the Kansas City Chiefs.

Matt Patricia, the former New England Patriots defensive coordinator, is getting improved results in his second year as Detroit’s head coach after the Lions went 6-10 last season.

The Lions are struggling this season on defense. They’re ranked 27th in the NFL in total defense and 29th against the pass. But the offense is thriving. The Lions are ranked eighth in the league in total offense, and quarterback Matthew Stafford has nine touchdown passes, two interceptions and a passer rating of 102.6 through four games.

The NFC North is the only division in the NFL that has all four teams with winning records. The Minnesota Vikings beat the Philadelphia Eagles Sunday to improve to 4-2, while the Chicago Bears, who are on a bye this week, are 3-2.

More NFL coverage: