The Bay FC defense had played so well for an hour and a half against the Washington Spirit, but with a one-goal lead and the season on the line late in Sunday’s NWSL first-round playoff game, two gaffes doomed the expansion team.

The first was a Tara McKown goal that left the Bay FC keeper rooted to her spot in the 82nd minute. The second, and most costly, came early in extra time, when veteran defender Caprice Dydasco knocked in an own goal while trying to defend a cross.

Bay FC was unable to equalize over the next 25 minutes and ended its inaugural season with a heartbreaking 2-1 first-round defeat in Washington.

With just eight minutes left in normal time, Bay FC appeared poised to pull off the stunner.

Bay FC’s star striker Asisat Oshoala had positioned herself a few yards in front of the net, and then calmly tapped Penelope Hocking’s cross for the game’s first goal.

It added another great moment to what was, despite the ending, a wildly successful first season for the expansion club.

But just as it appeared that seventh-seeded Bay FC would stun the No. 2 seed, Washington’s McKeown equalized on a strike from outside of the box.

Washington will play Gotham FC, which was a 2-1 winner Sunday against the Portland Thorns.

Led by former Barcelona striker Oshoala and coach Albertin Montoya, the Bay FC team founded by USWNT legends Brandi Chastain, Aly Wagner, Danielle Slaton, and Leslie Osborne went 11-1-14 in the regular season.

“You know, six months ago or seven months ago, who would’ve thought we would have been playing against the Spirit in the playoffs, and taking them into overtime,” said Montoya.

The Spirit had swept Bay FC in the regular season, winning 2-1 and then 3-0 in their matchups.

Washington star Trinity Rodman, who won gold with the USWNT at the Olympics this summer, entered the game with eight goals and six assists, and had a scare in the second half.

In the 52nd minute, Oshoala was competing for a ball with Rodman and ended up landing on the Spirit forward’s head as the two fell to the ground.

After receiving medical attention for a few minutes, Rodman was able to continue playing but was unable to make much of an impact as the focus of Bay FC’s defense.

“It was very important for us to double-team Trinity whenever she received the ball,” Montoya said. “Trinity is always going to be a dangerous player, but I thought we limited her chances.”

Bay FC’s attack had a long-awaited breakthrough in the regular-season finale at Houston. After going six matches without scoring more than one goal in a match, Racheal Kundananji scored twice as the team won 3-2.

That offense took a while to get going in the nation’s capital. Washington dominated possession early, with Montoya opting to drop defenders back with hopes of hitting the hosts on the counterattack.

The backline that included Dydasco and Abby Dahlkemper, and defensive midfielder Kiki Pickett, held up their end of the bargain, but that tactic came at the expense of the attack.

Starting in the 20th minute, Bay FC finally created a few scoring opportunities via a set piece and a counterattack, but they did not turn into goals. The best chance before Oshoala’s breakthrough came in the 35th minute, when Rachel Hill’s high shot was tipped away by Spirit goalkeeper Aubrey Kingsbury.

That attempt and Oshoala’s goal were Bay’s only shots on goal, while Washington managed six shots on goal.