By the end of last season, the Dallas Cowboys’ defense was in ruins. Teams were moving the ball at will. Dallas gave up 6.07 yards per play, third worst in the league. And according to weighted DVOA, this was the worst defense in football.

Some of the reasons for the drop-off were obvious. Five of those final six games were played without Sean Lee, the Cowboys’ star middle linebacker and at that point the best player on their defense. DeMarcus Ware wasn’t himself for most of the season as he dealt with a variety of injuries that he never fully recovered from. And it was clear that the change in scheme — from about a decade of running a 3-4 to Monte Kiffin’s 4-3 — didn’t take for many of the long-tenured guys on the team.

Knowing that they finished the year with the worst defense in football, this offseason the Cowboys did, well, almost nothing. Without any cap room, Dallas’s additions were mostly minor, with the exception of former Bears tackle Henry Melton. The lack of action was made worse by a rash of injuries before the season even started. By the end of May, Lee was already out for the season, this time with a torn ACL. The Cowboys’ dire cap situation led to Ware’s release. In looking for his long-term replacement, they gave up a third-round pick to move up in Round 2 of the NFL draft for Boise State defensive end DeMarcus Lawrence. On July 29, Lawrence broke his foot. Jason Hatcher, who piled up 11 sacks and was a revelation as a 4-3 tackle, left for Washington in free agency. As the Cowboys approached Week 1, what remained was a defense that finished dead last in the previous season and was now without arguably its three best players from that abysmal squad.

Outside of sheer randomness, there was little reason to believe that the Cowboys wouldn’t be among the worst defenses in football in 2014. But so far, that hasn’t happened. Yes, Dallas is only 24th in DVOA — and dead last against the run after Arian Foster’s monster day last week — but even that’s a significant improvement from where they were at the end of last season. So how has a team with less talent managed to become a passable NFL defense? To get that answer, it’s probably best to start at the top.

♦♦♦

The Cowboys’ personnel choices may have been minor, but the move from Monte Kiffin to Rod Marinelli as the team’s defensive coordinator has been significant. Marinelli’s history as a coordinator is actually very short. When he was hired as the head coach in Detroit, it was after seven seasons as the Buccaneers’ defensive line coach, a testament to just how highly regarded he was as a position coach. Even after leaving the Lions, it took a year in Chicago before he replaced Bob Babich as the team’s defensive coordinator. In his first year running the defense, the Bears jumped from 21st to fourth in defensive DVOA. The newly arrived Julius Peppers deserves some credit there, but Marinelli’s defenses sustained that level of success for each of his three years. In his final season, the Bears finished with the best defense in football.

Even after Lovie Smith was fired, the Bears tried holding on to Marinelli, but he passed, electing to reunite with Kiffin as the Cowboys’ defensive line coach. Jason Hatcher cited Marinelli’s influence as a reason for his career year at age 30. His prowess coaching defensive linemen speaks for itself, but with the way the Cowboys have played so far, it’s clear that he has a way of influencing an entire defense.

Aggressiveness defines Marinelli’s defenses. There are a million convenient clichés about his military history, but the truth is that players have reached their ceiling with the former Marine as a coordinator. Dallas is getting less pressure than they did last year — on 21.5 percent of drop backs compared to 23.3 last season — but it’s not a precipitous drop, considering what they lost.

That puts them at 24th in the league, but it’s still more pressure than someone might expect considering the talent along their defensive line, especially with Melton playing fewer snaps than expected. The guy picking up the slack is Tyrone Crawford, who seems to be this year’s version of the defensive lineman Marinelli turns into a real problem for opposing offenses. A third-round pick back in 2012, Crawford hasn’t recorded a sack through five games, but he’s created consistent pressure pretty much every week. It’s far from an elite pass rush, but it’s enough to sustain what’s been a respectable pass defense.

Much of the Cowboys’ front seven is made up of players who’d played out the string elsewhere. Jeremy Mincey was cut by the Jaguars. George Selvie was on the Bucs’ practice squad before last season. And we all know about Rolando McClain. So far, Dallas has gotten production out of all of them, with McClain being the true standout. He really has been a stabilizing force in the middle of this defense. Even with less Cover 2, it’s a scheme that asks a lot from its Mike linebacker in pass coverage, and McClain seemed more than up for it.

Comfort within the defense also seems to have played a big role in Bruce Carter’s improvement. The former second-round pick had a promising 2012 before playing so poorly at times last season that he was sent to the bench. His main issues were in coverage, where he’s gone from a liability to a true asset. Given how well Carter moves, that was always a possibility. Talent was never the question.

Dallas has been just about league-average against the pass, and while the coverage skills of the linebacker corps has played a part there, the secondary has really been solidified with the return of Orlando Scandrick. For years, Scandrick was a dependable slot corner, but he’s shown in the past two seasons that he can be a factor on the outside as well. Dallas lost Morris Claiborne for the season, but it’s not a stretch to say their trio of corners is actually better without him. Brandon Carr has been fine across from Scandrick, and Sterling Moore has been a pleasant surprise when given the chance.

Scandrick and Carr have at least shown at points in their career that they’re viable NFL starters, but the same can’t be said about the Cowboys’ safety duo. Both J.J. Wilcox and Barry Church had their nightmare moments last year, but more than any other position, safety has been a spot that Marinelli has been able to hide in his time as a coordinator. His starters on the league-best 2012 Bears were the much-maligned Chris Conte and the cut-by-the-Bucs Major Wright. He’s done it by changing up and disguising coverages constantly. Dallas has played just about everything this year, and their looks are constantly changing. There’s been some Cover 1 robber, which Marinelli ran a lot of in Chicago, but there’s also been plenty of Cover 3 mixed in. No matter what the coverage, Dallas always seems to be rolling into a different look just before the snap, doing their best to not let opposing quarterbacks do a lot of work before the play starts.

♦♦♦

The Cowboys defense is far from perfect. It’s not a surprise to see them dead last against the run, considering their front seven is designed more as an athletic group that can cover and get after the quarterback. But right now, that group is doing more than enough to cover for the Dallas offense.

Last year, the Chargers won 10 games thanks to a ball-control offense based on the running game and third-down success. Through five games, the Cowboys have followed a similar formula. Dallas averages the sixth-fewest yards to gain on third down, and no team has converted those third downs at a higher rate (55 percent). With the way their offensive line and DeMarco Murray are playing, the Cowboys have been able to dominate the clock and keep their defense off the field. They’re third in yards per drive.

Marinelli isn’t the only new coordinator on this staff, and Scott Linehan deserves a lot of credit for developing a game plan that deviates from much of what he did in Detroit. The Lions were the most pass-heavy team in football during his time there, but Dallas has created a style that plays to its strengths.

In almost every way, the Seahawks are an awful matchup for Dallas this Sunday. Seattle has been the best run defense in football through five weeks, and Marshawn Lynch should have an easy time against the Dallas run defense. But even if they do leave Seattle with a loss, there are signs that we should believe in the Cowboys’ 4-1 start. They’ve found the formula that works for them, and just like San Diego did a year ago, that formula could be enough to take them to the playoffs.