Washington-Lee gets set to take the field ahead of its regular season finale at Yorktown. (Nick Eilerson/For The Washington Post)

To most onlookers, the scene at Yorktown High on Friday night could not have been much uglier. A high-stakes rivalry showdown between Yorktown and Washington-Lee gave way to strengthening rainfall and devolved into a slop-fest featuring 10 turnovers and 19 penalties.

But when the final whistle sounded and the visiting student section burst onto the field, Washington-Lee players and coaches might have thought it all constituted the prettiest sight in all the land.

The visiting Generals left the field with a 27-7 victory that forced a rare three-way tie in the unofficial Arlington County championship decided annually among the two schools and Wakefield. More significantly, the win secured a playoff spot for a Washington-Lee team that found itself sitting on a 1-4 record just a month ago.

“It’s just a very proud moment for our school,” Washington-Lee Coach Josh Shapiro said. “It’s a big win. We haven’t had many of those against them in the last 35 years. It’s a big deal.”

Indeed, it’s not often Washington-Lee (5-5, 4-3 Conference 6) takes down Yorktown (3-7, 2-5), the county’s perennial standard-bearer on the gridiron. The Generals also got the better of their rivals in 2013, but this win felt even sweeter with everything on the line. Going into the game, both teams could throw out their mediocre records in a do-or-die scenario that meant playoffs or bust.

Washington-Lee looked hungrier for that playoff spot from the opening whistle, when junior wide receiver Quinn Parks took the opening kickoff 95 yards into the end zone to give the visitors a 7-0 lead 13 seconds into the contest.

The rest of the half was all downhill for both sides. The Generals generated three punts and two turnovers to close the half, while Yorktown came away with zero points in two trips inside the Washington-Lee 10-yard line.

Knowing his squad had a size advantage at the line of scrimmage, Shapiro told his guys at halftime to gear up for more running plays. Their spread passing attack wasn’t getting anything going as junior quarterback Andrew Malone finished the first half 7 for 14 for 54 yards and an interception.

Washington-Lee turned to senior tailback Ceneca Espinoza in the second half, and he broke tackles and churned hard-earned yards on the Generals’ opening possession. Malone’s first throw of the half found Parks on a slant over the middle, and the shifty wideout scampered 40 yards into the end zone to extend his team’s lead to 14-0.

Espinoza, who switched from quarterback to running back earlier in the season, finished with 143 yards and a touchdown on 34 carries.

“We just needed to make sure our linemen and receivers stayed on their blocks,” Espinoza said. “In the first half guys were slipping around and missing their blocks. In the second half we just stayed on our blocks and got the next level.”

A week after holding Madison — the conference’s top seed at 9-1 — to its second-lowest output of the year in a 21-13 loss, the Washington-Lee defense held Yorktown quarterback Stephen Glagola to nine completions on 33 pass attempts, including three interceptions and no touchdowns. They also limited the Patriots to just 25 rushing yards in the second half, just one of many glaring stat lines that wrapped up Yorktown’s first losing season since 1995.

Washington-Lee, meanwhile, picked up its fourth win in five outings .

“This is so special mainly because we get another game,” Espinoza said. “It’s a great feeling, but we’re not done yet.”